Skip to content

Commit

Permalink
Code format - (Clang-format)
Browse files Browse the repository at this point in the history
github-actions[bot] committed Jan 9, 2025
1 parent 5fbdf6f commit c449d51
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/server/network/message/networkmessage.cpp
Original file line number Diff line number Diff line change
@@ -116,7 +116,7 @@ std::string NetworkMessage::getString(uint16_t stringLen /* = 0*/, const std::so
info.position += stringLen;

// Convert the string to UTF-8 using Boost.Locale
std::string_view latin1Str{reinterpret_cast<const char*>(it), stringLen};
std::string_view latin1Str { reinterpret_cast<const char*>(it), stringLen };
return boost::locale::conv::to_utf<char>(latin1Str.data(), latin1Str.data() + latin1Str.size(), "ISO-8859-1", boost::locale::conv::skip);
}

4 changes: 2 additions & 2 deletions src/utils/tools.cpp
Original file line number Diff line number Diff line change
@@ -2137,6 +2137,6 @@ uint8_t calculateMaxPvpReduction(uint8_t blessCount, bool isPromoted /* = false*
return result;
}

std::string convertToUTF8(const std::string& input) {
std::string convertToUTF8(const std::string &input) {
return boost::locale::conv::to_utf<char>(input, "ISO-8859-1");
}
}
2 changes: 1 addition & 1 deletion src/utils/tools.hpp
Original file line number Diff line number Diff line change
@@ -224,4 +224,4 @@ const std::map<uint8_t, uint16_t> &getMaxValuePerSkill();
float calculateEquipmentLoss(uint8_t blessingAmount, bool isContainer = false);
uint8_t calculateMaxPvpReduction(uint8_t blessCount, bool isPromoted = false);

std::string convertToUTF8(const std::string& input);
std::string convertToUTF8(const std::string &input);

0 comments on commit c449d51

Please sign in to comment.