diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2021-09-21 15:13:14 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2021-09-21 15:14:05 (GMT) |
commit | edf67dd039f40a4222e41cc15a197cb6395bf885 (patch) | |
tree | 70e7d2bf0b3d93c4d9a49dd5fe6b60d3b731f830 /Source/cmStringAlgorithms.h | |
parent | cc56dc7468bfee49dedbf395d6fca5c372d200fe (diff) | |
download | CMake-edf67dd039f40a4222e41cc15a197cb6395bf885.zip CMake-edf67dd039f40a4222e41cc15a197cb6395bf885.tar.gz CMake-edf67dd039f40a4222e41cc15a197cb6395bf885.tar.bz2 |
cmValue: add IsInternallyOn methods
Diffstat (limited to 'Source/cmStringAlgorithms.h')
-rw-r--r-- | Source/cmStringAlgorithms.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Source/cmStringAlgorithms.h b/Source/cmStringAlgorithms.h index a9edcdf..fd5febf 100644 --- a/Source/cmStringAlgorithms.h +++ b/Source/cmStringAlgorithms.h @@ -224,20 +224,17 @@ std::string cmWrap(char prefix, Range const& rng, char suffix, * forced this value. This is not the same as On, but this * may be considered as "internally switched on". */ -bool cmIsInternallyOn(cm::string_view val); +inline bool cmIsInternallyOn(cm::string_view val) +{ + return cmValue::IsInternallyOn(val); +} inline bool cmIsInternallyOn(const char* val) { - if (!val) { - return false; - } - return cmIsInternallyOn(cm::string_view(val)); + return cmValue::IsInternallyOn(val); } inline bool cmIsInternallyOn(cmValue val) { - if (!val) { - return false; - } - return cmIsInternallyOn(*val); + return val.IsInternallyOn(); } /** Check for non-empty Property/Variable value. */ |