Fixed some issues with compilation in CLang.
This commit is contained in:
parent
acb5d5b04e
commit
822abb7b30
@ -62,7 +62,7 @@ const char* lookupFunctionName(const void* function)
|
|||||||
#else
|
#else
|
||||||
std::string name = "<unknown>";
|
std::string name = "<unknown>";
|
||||||
#endif
|
#endif
|
||||||
return g_functionNameCache.insert({function, std::move(name)}).first->second.c_str();
|
return g_functionNameCache.emplace(function, std::move(name)).first->second.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if MIJIN_COMPILER == MIJIN_COMPILER_GCC
|
#if MIJIN_COMPILER == MIJIN_COMPILER_GCC
|
||||||
|
|||||||
@ -75,7 +75,7 @@ static std::size_t getOrCreateStringID(std::string_view string)
|
|||||||
{
|
{
|
||||||
if (getLocalNames()[idx] == string)
|
if (getLocalNames()[idx] == string)
|
||||||
{
|
{
|
||||||
getLocalNameCache()[std::string(string)] = idx;
|
getLocalNameCache().emplace(std::string(string), idx);
|
||||||
return idx;
|
return idx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -90,7 +90,7 @@ static std::size_t getOrCreateStringID(std::string_view string)
|
|||||||
{
|
{
|
||||||
if (getLocalNames()[idx] == string)
|
if (getLocalNames()[idx] == string)
|
||||||
{
|
{
|
||||||
getLocalNameCache()[std::string(string)] = idx;
|
getLocalNameCache().emplace(std::string(string), idx);
|
||||||
return idx;
|
return idx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -100,7 +100,7 @@ static std::size_t getOrCreateStringID(std::string_view string)
|
|||||||
const std::size_t idx = getGlobalNames().size();
|
const std::size_t idx = getGlobalNames().size();
|
||||||
getGlobalNames().emplace_back(string);
|
getGlobalNames().emplace_back(string);
|
||||||
copyNamesToLocal();
|
copyNamesToLocal();
|
||||||
getLocalNameCache()[std::string(string)] = idx;
|
getLocalNameCache().emplace(std::string(string), idx);
|
||||||
|
|
||||||
return idx;
|
return idx;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user