diff options
author | Brad King <brad.king@kitware.com> | 2015-09-10 10:04:20 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-09-10 10:04:20 -0400 |
commit | 87a9061d57d2838b3793644a051542e329d305fa (patch) | |
tree | dc24621bbe51b0612354e21c987c4977bbcd3607 /Source/cmSystemTools.cxx | |
parent | ac77a569946d19766016841fa8b2c6174badf07e (diff) | |
download | cmake-87a9061d57d2838b3793644a051542e329d305fa.tar.gz |
cmSystemTools: Factor out a cm_isspace helper
Extract the logic added by commit v3.1.0-rc1~386^2 (Encoding: Fix debug
asserts ... with non-ascii chars, 2014-06-16) into a helper function so
we can re-use it.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index b1b7f47225..84a288cc6a 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -68,6 +68,11 @@ # include "cmMachO.h" #endif +static bool cm_isspace(char c) +{ + return ((c & 0x80) == 0) && isspace(c); +} + class cmSystemToolsFileTime { public: @@ -496,7 +501,7 @@ void cmSystemTools::ParseWindowsCommandLine(const char* command, { arg.append(backslashes, '\\'); backslashes = 0; - if(((*c & 0x80) == 0 ) && isspace(*c)) + if (cm_isspace(*c)) { if(in_quotes) { |