summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.h
diff options
context:
space:
mode:
authorRuslan Baratov <ruslan_baratov@yahoo.com>2014-11-25 22:45:26 (GMT)
committerBrad King <brad.king@kitware.com>2014-12-03 14:47:26 (GMT)
commit05d6531c7a8ecfad513a0e76b44b273b70fa919b (patch)
tree82f4563add948600202a9f7d4dfeba81bfb5a51e /Source/cmSystemTools.h
parent3350e4d209b6a7ff758ca371af4d62844a66ab36 (diff)
downloadCMake-05d6531c7a8ecfad513a0e76b44b273b70fa919b.zip
CMake-05d6531c7a8ecfad513a0e76b44b273b70fa919b.tar.gz
CMake-05d6531c7a8ecfad513a0e76b44b273b70fa919b.tar.bz2
cmSystemTools: Add StringToInt helper
Convert a string to a signed integer and reject any extra input. Co-Author: Rolf Eike Beer <eike@sf-mail.de>
Diffstat (limited to 'Source/cmSystemTools.h')
-rw-r--r--Source/cmSystemTools.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index 4455dd1..763389b 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -458,6 +458,9 @@ public:
static std::vector<std::string> tokenize(const std::string& str,
const std::string& sep);
+ /** Convert string to int. Expected that the whole string is an integer */
+ static bool StringToInt(const char* str, int* value);
+
#ifdef _WIN32
struct WindowsFileRetry
{