Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace boost::lexical_cast with std equivalent #4

Merged
merged 1 commit into from
Jun 2, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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