Warnings improvements
* Turn off global-constructors warning. These are needed to implement cRoot signal handler functionality
* Add Clang flags based on version lookup instead of a compile test. The CMake config process is single threaded and slow enough already
* Reduced GetStackValue verbosity
+ Clarify EnchantmentLevel, StayCount, AlwaysTicked, ViewDistance signedness
+ Give SettingsRepositoryInterface a move constructor to simplify main.cpp code
- Remove do {} while (false) construction in redstone handler
This commit is contained in:
@@ -151,13 +151,7 @@ namespace StatSerializer
|
||||
|
||||
if ((FindResult != LegacyMapping.end()) && Entry->isInt())
|
||||
{
|
||||
auto Value = Entry->asInt();
|
||||
if (Value < 0)
|
||||
{
|
||||
FLOGWARNING("Invalid stat value: {0} = {1}", Key, Value);
|
||||
continue;
|
||||
}
|
||||
Manager.SetValue(FindResult->second, ToUnsigned(Value));
|
||||
Manager.SetValue(FindResult->second, Entry->asUInt());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -181,13 +175,7 @@ namespace StatSerializer
|
||||
const auto & StatName = StatInfo.second;
|
||||
try
|
||||
{
|
||||
auto Value = it->asInt();
|
||||
if (Value < 0)
|
||||
{
|
||||
FLOGWARNING("Invalid statistic value: {0} = {1}", Key, Value);
|
||||
continue;
|
||||
}
|
||||
Manager.SetValue(NamespaceSerializer::ToCustomStatistic(StatName), ToUnsigned(Value));
|
||||
Manager.SetValue(NamespaceSerializer::ToCustomStatistic(StatName), it->asUInt());
|
||||
}
|
||||
catch (const std::out_of_range &)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user