From 3ffe63b8a4e8a3ceda3f6d204e4b5bb0c80d0870 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 21 Feb 2024 16:49:48 +0100 Subject: Convert remaining BOOLs in llxml and introduce std::string_view --- indra/llcommon/llstring.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'indra/llcommon/llstring.h') diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index f2741a0e1f..6893b8ebff 100644 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -28,8 +28,9 @@ #define LL_LLSTRING_H #include -#include +#include #include +#include #include #include // std::wcslen() //#include @@ -345,7 +346,7 @@ public: * (key is always UTF-8) * detect absence by (! return value) */ - static boost::optional getoptenv(const std::string& key); + static std::optional getoptenv(const std::string& key); static void addCRLF(string_type& string); static void removeCRLF(string_type& string); @@ -819,11 +820,11 @@ STRING windows_message() { return windows_message(GetLastError()); } //@} -LL_COMMON_API boost::optional llstring_getoptenv(const std::string& key); +LL_COMMON_API std::optional llstring_getoptenv(const std::string& key); #else // ! LL_WINDOWS -LL_COMMON_API boost::optional llstring_getoptenv(const std::string& key); +LL_COMMON_API std::optional llstring_getoptenv(const std::string& key); #endif // ! LL_WINDOWS @@ -1773,17 +1774,17 @@ bool LLStringUtilBase::endsWith( // static template -auto LLStringUtilBase::getoptenv(const std::string& key) -> boost::optional +auto LLStringUtilBase::getoptenv(const std::string& key) -> std::optional { auto found(llstring_getoptenv(key)); if (found) { - // return populated boost::optional + // return populated std::optional return { ll_convert(*found) }; } else { - // empty boost::optional + // empty std::optional return {}; } } -- cgit v1.2.3