Warning fixes

This commit is contained in:
brainiac
2025-12-28 02:12:41 -08:00
parent e12c52a66a
commit 94ca0c44d1
25 changed files with 54 additions and 72 deletions
+2 -2
View File
@@ -132,7 +132,7 @@ void WorldContentService::SetContentFlags(const std::vector<ContentFlagsReposito
bool WorldContentService::IsContentFlagEnabled(const std::string &content_flag)
{
for (auto &f: GetContentFlags()) {
if (f.flag_name == content_flag && f.enabled == true) {
if (f.flag_name == content_flag && f.enabled == 1) {
return true;
}
}
@@ -147,7 +147,7 @@ bool WorldContentService::IsContentFlagEnabled(const std::string &content_flag)
bool WorldContentService::IsContentFlagDisabled(const std::string &content_flag)
{
for (auto &f: GetContentFlags()) {
if (f.flag_name == content_flag && f.enabled == false) {
if (f.flag_name == content_flag && f.enabled == 0) {
return true;
}
}
+1 -1
View File
@@ -125,6 +125,6 @@ uint32 CRC32::Update(const uint8* buf, uint32 bufsize, uint32 crc32var) {
return crc32var;
}
inline void CRC32::Calc(const uint8 byte, uint32& crc32var) {
void CRC32::Calc(const uint8 byte, uint32& crc32var) {
crc32var = ((crc32var) >> 8) ^ CRC32Table[(byte) ^ ((crc32var) & 0x000000FF)];
}
+2 -2
View File
@@ -56,12 +56,12 @@ void PlayerEventLogs::Init()
auto s = PlayerEventLogSettingsRepository::All(*m_database);
std::vector<int> db{};
db.reserve(s.size());
for (auto &e: s) {
for (auto& e: s) {
if (e.id >= PlayerEvent::MAX) {
continue;
}
m_settings[e.id] = e;
db.emplace_back(e.id);
db.emplace_back(static_cast<int>(e.id));
}
std::vector<PlayerEventLogSettingsRepository::PlayerEventLogSettings> settings_to_insert{};
+1 -1
View File
@@ -349,7 +349,7 @@ bool EQ::InventoryProfile::SwapItem(
fail_state = swapLevel;
return false;
}
if (source_item_instance->IsEvolving() > 0) {
if (source_item_instance->IsEvolving()) {
source_item_instance->SetEvolveEquipped(true);
}
}
+1
View File
@@ -320,6 +320,7 @@ bool EQ::ItemInstance::IsAugmentSlotAvailable(int32 augment_type, uint8 slot) co
}
return (
slot < invaug::SOCKET_COUNT &&
(
augment_type == -1 ||
(
+2 -2
View File
@@ -49,9 +49,9 @@ namespace EQ
WebsocketException(const std::string &msg)
: _msg(msg.empty() ? "Unknown Error" : msg) { }
~WebsocketException() throw() {}
~WebsocketException() noexcept {}
virtual char const *what() const throw() {
virtual char const *what() const noexcept override {
return _msg.c_str();
}
private:
+2 -2
View File
@@ -4120,8 +4120,8 @@ namespace RoF2
std::begin(emu->items),
std::end(emu->items),
std::begin(eq->items),
[&](const uint32 x) {
return x;
[&](uint64 x) {
return static_cast<uint32>(x);
}
);
std::copy_n(