diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2011-12-19 17:08:25 -0500 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2011-12-19 19:10:34 -0500 |
commit | 26ce92b3526430d4a40b2faccef4facb966d6a0a (patch) | |
tree | e23a92f6152c3abcf8cf3c42bf5a5b50ecc5dc42 /src/qt/optionsmodel.cpp | |
parent | bd846c0e565ca0db276cb6b7eac7763bebe19b84 (diff) |
Use std::numeric_limits<> for typesafe INT_MAX/etc
Diffstat (limited to 'src/qt/optionsmodel.cpp')
-rw-r--r-- | src/qt/optionsmodel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index efc216dab8..eef91db5ba 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -101,7 +101,7 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in case ProxyPort: { int nPort = atoi(value.toString().toAscii().data()); - if (nPort > 0 && nPort < USHRT_MAX) + if (nPort > 0 && nPort < std::numeric_limits<unsigned short>::max()) { addrProxy.port = htons(nPort); walletdb.WriteSetting("addrProxy", addrProxy); |