Modernize code:

* Clean STBase-derived class creation interfaces
* Annotate overriden STBase virtual functions
* Optimize path deserialization
* Prefer range-based for
* Prefer std::unique_ptr
* Remove BOOST_FOREACH
This commit is contained in:
Nik Bougalis
2014-12-31 22:02:14 -08:00
parent e742da73bd
commit 47593730d6
43 changed files with 638 additions and 547 deletions

View File

@@ -42,7 +42,7 @@ inline std::uint32_t max (std::uint32_t x, std::uint32_t y)
bool RangeSet::hasValue (std::uint32_t v) const
{
BOOST_FOREACH (const value_type & it, mRanges)
for (auto const& it : mRanges)
{
if (contains (it, v))
return true;
@@ -62,7 +62,7 @@ std::uint32_t RangeSet::getFirst () const
std::uint32_t RangeSet::getNext (std::uint32_t v) const
{
BOOST_FOREACH (const value_type & it, mRanges)
for (auto const& it : mRanges)
{
if (it.first > v)
return it.first;
@@ -190,7 +190,7 @@ void RangeSet::clearValue (std::uint32_t v)
std::string RangeSet::toString () const
{
std::string ret;
BOOST_FOREACH (value_type const & it, mRanges)
for (auto const& it : mRanges)
{
if (!ret.empty ())
ret += ",";