This commit is contained in:
JoelKatz
2013-01-30 18:55:42 -08:00
parent 163c4869d6
commit 2ff3583b7d
2 changed files with 2 additions and 2 deletions

View File

@@ -142,7 +142,7 @@ STAmount::STAmount(SField::ref n, const Json::Value& v)
std::vector<std::string> elements; std::vector<std::string> elements;
boost::split(elements, val, boost::is_any_of("\t\n\r ,/")); boost::split(elements, val, boost::is_any_of("\t\n\r ,/"));
if ((elements.size() < 0) || (elements.size() > 3)) if (elements.size() > 3)
throw std::runtime_error("invalid amount string"); throw std::runtime_error("invalid amount string");
value = elements[0]; value = elements[0];

View File

@@ -23,7 +23,7 @@ public:
KeyCache(const std::string& name, int size = 0, int age = 120) : mName(name), mTargetSize(size), mTargetAge(age) KeyCache(const std::string& name, int size = 0, int age = 120) : mName(name), mTargetSize(size), mTargetAge(age)
{ {
assert((mTargetSize >= 0) && (mTargetAge > 2)); assert((size >= 0) && (age > 2));
} }
void getSize() void getSize()