Optimize parameter passing to avoid unnecessary copying

This commit is contained in:
Pugemon
2024-06-07 04:00:38 +03:00
parent 46ca1bb04a
commit f25a425cb9
123 changed files with 578 additions and 522 deletions
+3 -3
View File
@@ -18,11 +18,11 @@ namespace util {
uint encode_utf8(uint32_t c, ubyte* bytes);
uint32_t decode_utf8(uint& size, const char* bytes);
std::string wstr2str_utf8(const std::wstring ws);
std::wstring str2wstr_utf8(const std::string s);
std::string wstr2str_utf8(const std::wstring &ws);
std::wstring str2wstr_utf8(const std::string &s);
bool is_integer(const std::string& text);
bool is_integer(const std::wstring& text);
bool is_valid_filename(std::wstring name);
bool is_valid_filename(const std::wstring &name);
void ltrim(std::string &s);
void rtrim(std::string &s);