diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-07-28 14:33:47 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-07-28 15:47:26 (GMT) |
commit | 8573e20c43af4e0313a001f4fbc325ab5a899e3d (patch) | |
tree | b696055bea425e5d0fc2d2f70285019ff9ea8d70 /Source/cmOutputConverter.cxx | |
parent | 49117623581f8f154adcf92820dce48a4dfbe71d (diff) | |
download | CMake-8573e20c43af4e0313a001f4fbc325ab5a899e3d.zip CMake-8573e20c43af4e0313a001f4fbc325ab5a899e3d.tar.gz CMake-8573e20c43af4e0313a001f4fbc325ab5a899e3d.tar.bz2 |
cmOutputConverter: Let GetFortranFormat accept a cm::string_view
Diffstat (limited to 'Source/cmOutputConverter.cxx')
-rw-r--r-- | Source/cmOutputConverter.cxx | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index fd64cf5..32410f4 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -150,13 +150,11 @@ std::string cmOutputConverter::EscapeWindowsShellArgument(const char* arg, } cmOutputConverter::FortranFormat cmOutputConverter::GetFortranFormat( - const char* value) + cm::string_view value) { FortranFormat format = FortranFormatNone; - if (value && *value) { - std::vector<std::string> fmt; - cmSystemTools::ExpandListArgument(value, fmt); - for (std::string const& fi : fmt) { + if (!value.empty()) { + for (std::string const& fi : cmSystemTools::ExpandedListArgument(value)) { if (fi == "FIXED") { format = FortranFormatFixed; } @@ -168,6 +166,15 @@ cmOutputConverter::FortranFormat cmOutputConverter::GetFortranFormat( return format; } +cmOutputConverter::FortranFormat cmOutputConverter::GetFortranFormat( + const char* value) +{ + if (!value) { + return FortranFormatNone; + } + return GetFortranFormat(cm::string_view(value)); +} + void cmOutputConverter::SetLinkScriptShell(bool linkScriptShell) { this->LinkScriptShell = linkScriptShell; |