mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 21:47:40 -05:00
sys: Enable -Wall, -Wextra, -Werror and fix all warnings on all Platforms (#483)
* sys: Make ImHex compile with -Wall -Wextra -Werror * sys: Fixed various build errors on Linux * sys: Explicitly ignore return value of `system` function * sys: More fixes for the warnings GitHub Actions enables somehow * sys: More fixes * sys: Remove -Werror again to see all GitHub Actions warnings * sys: Hopefully fixed all remaining warnings * sys: Added back -Werror * git: Change windows icon in GitHub Actions
This commit is contained in:
@@ -39,8 +39,7 @@ namespace hex::pl {
|
||||
|
||||
std::optional<Token::Literal> lexIntegerLiteral(std::string_view string) {
|
||||
bool hasFloatSuffix = string.ends_with('D') || string.ends_with('F') || string.ends_with('d') || string.ends_with('f');
|
||||
bool isFloat = std::count(string.begin(), string.end(), '.') == 1 ||
|
||||
!string.starts_with("0x") && hasFloatSuffix;
|
||||
bool isFloat = std::count(string.begin(), string.end(), '.') == 1 || (!string.starts_with("0x") && hasFloatSuffix);
|
||||
|
||||
if (isFloat) {
|
||||
// Parse double
|
||||
|
||||
@@ -215,7 +215,7 @@ namespace hex::pl {
|
||||
});
|
||||
|
||||
for (const auto &[define, value, defineLine] : sortedDefines) {
|
||||
i32 index = 0;
|
||||
size_t index = 0;
|
||||
while ((index = output.find(define, index)) != std::string::npos) {
|
||||
output.replace(index, define.length(), value);
|
||||
index += value.length();
|
||||
|
||||
Reference in New Issue
Block a user