Fix Release Build Environment

+ addressed every code safety demands compiler had in order to make it possible to build in release configuration without suppressing warning(warning C4244 still had to be suppressed because it was coming from external libraries xxhash and stb)

+ changed to proxying XInput9_1_0 instead of directx11 interface

+ recoded protocolbuffer helper

+ improved variable namings in fileshare

- removed ida_defs.h header as its not needed anymore
This commit is contained in:
project-bo4
2024-08-16 07:36:41 +03:30
parent ff71bec3a3
commit e00fdf473a
19 changed files with 212 additions and 608 deletions

View File

@ -262,17 +262,17 @@ namespace utilities::string
return StringMatch::Mismatch;
}
double match(const std::string& input, const std::string& text)
float match(const std::string& input, const std::string& text)
{
if (text == input) return 1.00; // identical
size_t offset = to_lower(text).find(to_lower(input));
auto offset = to_lower(text).find(to_lower(input));
if (offset == std::string::npos) return 0.00; // mismatch
int len_variance = text.length() - input.length();
int match_percent = 100 - (1 + len_variance + offset);
auto len_variance = text.length() - input.length();
size_t match_percent = 100 - (1 + len_variance + offset);
return ((double)match_percent / 100);
return (static_cast<float>(match_percent) / 100);
}
bool contains(std::string text, std::string substr, bool sensetive)

View File

@ -122,6 +122,6 @@ namespace utilities::string
};
StringMatch compare(const std::string& s1, const std::string& s2);
double match(const std::string& input, const std::string& text);
float match(const std::string& input, const std::string& text);
bool contains(std::string text, std::string substr, bool sensetive = false);
}