Skip to content

Commit

Permalink
Merge pull request #4 from lsst/tickets/DM-6090
Browse files Browse the repository at this point in the history
Replace boost::lexical_cast with std equivalent
  • Loading branch information
Pim Schellart authored and Pim Schellart committed Jun 2, 2016
2 parents 9f41d6c + 9e983fe commit 298db87
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/Dictionary.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* LSST Data Management System
* Copyright 2008, 2009, 2010 LSST Corporation.
* Copyright 2008-2016 LSST Corporation.
*
* This product includes software developed by the
* LSST Project (http://www.lsst.org/).
Expand All @@ -27,7 +27,6 @@
#include "lsst/pex/policy/PolicyFile.h"
// #include "lsst/pex/utils/Trace.h"

#include <boost/lexical_cast.hpp>
#include <boost/regex.hpp>

#include <memory>
Expand Down Expand Up @@ -377,8 +376,7 @@ void Definition::validateBasic(const string& name, const T& value,
throw LSST_EXCEPT
(DictionaryError,
string("Min value for ") + getPrefix() + name
+ " (" + boost::lexical_cast<string>(min)
+ ") already specified; additional value not allowed.");
+ " already specified; additional value not allowed.");
}
try {
min = a->getValue<T>(Dictionary::KW_MIN);
Expand All @@ -398,8 +396,7 @@ void Definition::validateBasic(const string& name, const T& value,
throw LSST_EXCEPT
(DictionaryError,
string("Max value for ") + getPrefix() + name
+ " (" + boost::lexical_cast<string>(max)
+ ") already specified; additional value not allowed.");
+ " already specified; additional value not allowed.");
try {
max = a->getValue<T>(Dictionary::KW_MAX);
maxFound = true; // after max assign, in case of exceptions
Expand Down Expand Up @@ -694,7 +691,7 @@ int Dictionary::loadPolicyFiles(const boost::filesystem::path& repository, bool
}
throw LSST_EXCEPT
(DictionaryError, string("Exceeded recursion limit (")
+ boost::lexical_cast<string>(maxLevel)
+ std::to_string(maxLevel)
+ ") loading policy files; does this dictionary contain a circular"
" definition?");
}
Expand All @@ -711,7 +708,7 @@ void Dictionary::check() const {
if (defs.size() > 1)
throw LSST_EXCEPT
(DictionaryError, string("expected a single \"") + KW_DEFINITIONS
+ "\" section; found " + boost::lexical_cast<string>(defs.size()));
+ "\" section; found " + std::to_string(defs.size()));

Policy::StringArray names = defs[0]->names(false);
for (Policy::StringArray::const_iterator i = names.begin();
Expand Down

0 comments on commit 298db87

Please sign in to comment.