diff options
| author | Jeffrey Walton <noloader@gmail.com> | 2016-09-21 23:04:43 -0400 |
|---|---|---|
| committer | Jeffrey Walton <noloader@gmail.com> | 2016-09-21 23:04:43 -0400 |
| commit | 933e63f16249920f67aa0bc935f1629f35e98eec (patch) | |
| tree | deee18595161e701d5080022917b769a94910a97 /test.cpp | |
| parent | 91020ce3ba655922bdba1374cbd910b4b9f8784c (diff) | |
| download | cryptopp-git-933e63f16249920f67aa0bc935f1629f35e98eec.tar.gz | |
Fix use of template parameter as a condition
Diffstat (limited to 'test.cpp')
| -rw-r--r-- | test.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -438,10 +438,8 @@ T StringToValue(const std::string& str) { if (iss.fail())
throw InvalidArgument("cryptest.exe: '" + str +"' is not a value");
-#if NON_NEGATIVE
- if (value < 0)
+ if (NON_NEGATIVE && value < 0)
throw InvalidArgument("cryptest.exe: '" + str +"' is negative");
-#endif
return value;
}
|
