Unhack the string_view workaround in llpreviewgesture, with a slightly less hacky hack in llstring. lol. Thanks Liru for making this as lean as ancient gcc can stand it to be.

This commit is contained in:
Router Gray
2020-04-26 00:19:16 -05:00
parent a69e04a817
commit 32dbd40e64
4 changed files with 13 additions and 15 deletions

View File

@@ -85,6 +85,7 @@ if (WINDOWS)
/TP
/W3
/c
/Zc:__cplusplus
/Zc:forScope
/Zc:rvalueCast
/Zc:wchar_t

View File

@@ -300,6 +300,7 @@ target_link_libraries(
${CORESERVICES_LIBRARY}
${URIPARSER_LIBRARY}
nlohmann_json::nlohmann_json
absl::strings
${RT_LIBRARY}
)

View File

@@ -29,6 +29,16 @@
#include <boost/optional/optional.hpp>
#include <string>
#if __cplusplus < 201606
#include <absl/strings/string_view.h>
namespace std {
typedef absl::string_view string_view;
}
#else
#include <string_view>
#endif
#include <cstdio>
//#include <locale>
#include <iomanip>

View File

@@ -1609,22 +1609,8 @@ std::string LLPreviewGesture::getLabel(const std::vector<std::string>& v_labels)
for(const auto& pair : LLPreview::sInstances)
{
const auto& pPreview(pair.second);
#ifndef LL_WINDOWS
#if __cplusplus >= 201606
constexpr std::string_view gesture("Gesture");
if (pPreview && pPreview->getTitleName().compare(gesture) == 0)
LL_COMPILE_TIME_MESSAGE("String view support detected, remove this macro check, this line and the old check below");
#endif
#endif
if (pPreview && pPreview->getTitleName() ==
#ifndef LL_WINDOWS
static_cast<const std::string>(
#endif
"Gesture"
#ifndef LL_WINDOWS
)
#endif
)
if (pPreview && std::string_view(pPreview->getTitleName()) == gesture)
{
wait_anim = pPreview->getChild<LLCheckBoxCtrl>("wait_anim_check")->getLabel();
break;