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:
@@ -85,6 +85,7 @@ if (WINDOWS)
|
||||
/TP
|
||||
/W3
|
||||
/c
|
||||
/Zc:__cplusplus
|
||||
/Zc:forScope
|
||||
/Zc:rvalueCast
|
||||
/Zc:wchar_t
|
||||
|
||||
@@ -300,6 +300,7 @@ target_link_libraries(
|
||||
${CORESERVICES_LIBRARY}
|
||||
${URIPARSER_LIBRARY}
|
||||
nlohmann_json::nlohmann_json
|
||||
absl::strings
|
||||
${RT_LIBRARY}
|
||||
)
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user