SL-10153: auto name{expression} declares an initializer_list
instead of a variable of type decltype(expression). Using SHGetKnownFolderPath(FOLDERID_Fonts) in LLFontGL::getFontPathSystem() requires new Windows #include files. A variable with a constructor can't be declared within the braces of a switch statement, even outside any of its case clauses.master
parent
3c53f8abde
commit
4a13657285
|
|
@ -1755,7 +1755,7 @@ bool LLStringUtilBase<T>::endsWith(
|
|||
template<class T>
|
||||
auto LLStringUtilBase<T>::getoptenv(const std::string& key) -> boost::optional<string_type>
|
||||
{
|
||||
auto found{llstring_getoptenv(key)};
|
||||
auto found(llstring_getoptenv(key));
|
||||
if (found)
|
||||
{
|
||||
// return populated boost::optional
|
||||
|
|
@ -1772,7 +1772,7 @@ auto LLStringUtilBase<T>::getoptenv(const std::string& key) -> boost::optional<s
|
|||
template<class T>
|
||||
auto LLStringUtilBase<T>::getenv(const std::string& key, const string_type& dflt) -> string_type
|
||||
{
|
||||
auto found{getoptenv(key)};
|
||||
auto found(getoptenv(key));
|
||||
if (found)
|
||||
{
|
||||
return *found;
|
||||
|
|
|
|||
|
|
@ -44,6 +44,12 @@
|
|||
// Third party library includes
|
||||
#include <boost/tokenizer.hpp>
|
||||
|
||||
#if LL_WINDOWS
|
||||
#include <Shlobj.h>
|
||||
#include <Knownfolders.h>
|
||||
#include <Objbase.h>
|
||||
#endif // LL_WINDOWS
|
||||
|
||||
const S32 BOLD_OFFSET = 1;
|
||||
|
||||
// static class members
|
||||
|
|
|
|||
|
|
@ -53,16 +53,16 @@ namespace
|
|||
std::ofstream* prelogf = nullptr;
|
||||
|
||||
void prelog(const std::string& message)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
boost::optional<std::string> prelog_name;
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case prst::INIT:
|
||||
// assume we failed, until we succeed
|
||||
state = prst::SKIP;
|
||||
|
||||
prelog_name = LLDirUtil::getoptenv("PRELOG");
|
||||
prelog_name = LLStringUtil::getoptenv("PRELOG");
|
||||
if (! prelog_name)
|
||||
// no PRELOG variable set, carry on
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in New Issue