1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Drop wide/narrow conversion functions

The only valid usecase for these is interfacing with OS APIs
that want a locale/OS-specific multibyte encoding.
But they weren't used for that anywhere, instead UTF-8 is pretty
much assumed when it comes to that.
Since these are only a potential source of bugs and do not fulfil
their purpose at all, drop them entirely.
This commit is contained in:
sfan5 2021-01-29 14:03:27 +01:00
parent 5e392cf34f
commit c834d2ab25
11 changed files with 41 additions and 143 deletions

View file

@ -219,7 +219,7 @@ public:
void onMapEditEvent(const MapEditEvent &event);
// Connection must be locked when called
std::wstring getStatusString();
std::string getStatusString();
inline double getUptime() const { return m_uptime_counter->get(); }
// read shutdown state
@ -495,10 +495,8 @@ private:
void handleChatInterfaceEvent(ChatEvent *evt);
// This returns the answer to the sender of wmessage, or "" if there is none
std::wstring handleChat(const std::string &name, const std::wstring &wname,
std::wstring wmessage_input,
bool check_shout_priv = false,
RemotePlayer *player = NULL);
std::wstring handleChat(const std::string &name, std::wstring wmessage_input,
bool check_shout_priv = false, RemotePlayer *player = nullptr);
void handleAdminChat(const ChatEventChat *evt);
// When called, connection mutex should be locked