diff options
Diffstat (limited to 'Source/cmProperty.h')
-rw-r--r-- | Source/cmProperty.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmProperty.h b/Source/cmProperty.h index b0fcce7f53..47eec9397a 100644 --- a/Source/cmProperty.h +++ b/Source/cmProperty.h @@ -26,4 +26,14 @@ public: using cmProp = const std::string*; +inline const char* cmToCStr(cmProp p) +{ + return p ? p->c_str() : nullptr; +} + +inline const char* cmToCStrSafe(cmProp p) +{ + return p ? p->c_str() : ""; +} + #endif |