From 2f9dea35cff40a676b4603b8ffbd1f2669a4195a Mon Sep 17 00:00:00 2001 From: Dimitar Trendafilov Date: Tue, 21 Sep 2021 21:23:27 +0300 Subject: Fix warnings found by clangd --- spasm/src/asm/lexdump.cpp | 6 +++--- spasm/src/asm/lexdump3.cpp | 6 +++--- spasm/src/spasm.cpp | 1 - spasm/src/spasm.hpp | 1 - spasm/src/spasm_impl.hpp | 1 + spasm/src/value.hpp | 1 + 6 files changed, 8 insertions(+), 8 deletions(-) (limited to 'spasm/src') diff --git a/spasm/src/asm/lexdump.cpp b/spasm/src/asm/lexdump.cpp index 440ff1e..b609124 100644 --- a/spasm/src/asm/lexdump.cpp +++ b/spasm/src/asm/lexdump.cpp @@ -42,12 +42,12 @@ class TokenDumper : public TokenStream std::cout.width(8); std::cout << token.lineno(); std::cout << ": " << token_name[ttype]; - if (ttype == Token::integer || ttype == Token::xinteger) + if (ttype == Token::Integer || ttype == Token::XInteger) std::cout << '|' << token.value_int() << '|'; - else if (ttype == Token::ident) + else if (ttype == Token::Ident) std::cout << '|' << token.value_str() << '|'; std::cout << std::endl; - if (token.type() == Token::endinput) + if (token.type() == Token::EndInput) end_reached = true; } diff --git a/spasm/src/asm/lexdump3.cpp b/spasm/src/asm/lexdump3.cpp index 4e4ce9e..400058b 100644 --- a/spasm/src/asm/lexdump3.cpp +++ b/spasm/src/asm/lexdump3.cpp @@ -44,16 +44,16 @@ int main() Token token; token = td.next_token(); - while (token.type() != Token::endinput) + while (token.type() != Token::EndInput) { token = td.next_token(); Token::Token_type ttype = token.type(); std::cout.width(8); std::cout << token.lineno(); std::cout << ": " << token_name[ttype]; - if (ttype == Token::integer || ttype == Token::xinteger) + if (ttype == Token::Integer || ttype == Token::XInteger) std::cout << '|' << token.value_int() << '|'; - else if (ttype == Token::ident) + else if (ttype == Token::Ident) std::cout << '|' << token.value_str() << '|'; std::cout << std::endl; } diff --git a/spasm/src/spasm.cpp b/spasm/src/spasm.cpp index 94086a6..dab81b9 100644 --- a/spasm/src/spasm.cpp +++ b/spasm/src/spasm.cpp @@ -1,6 +1,5 @@ #include #include -#include #include "spasm.hpp" diff --git a/spasm/src/spasm.hpp b/spasm/src/spasm.hpp index da3f44f..01015d3 100644 --- a/spasm/src/spasm.hpp +++ b/spasm/src/spasm.hpp @@ -2,7 +2,6 @@ #define SPASM_HPP #include "spasm_impl.hpp" -#include "value.hpp" namespace Spasm { diff --git a/spasm/src/spasm_impl.hpp b/spasm/src/spasm_impl.hpp index 04e809a..c568902 100644 --- a/spasm/src/spasm_impl.hpp +++ b/spasm/src/spasm_impl.hpp @@ -2,6 +2,7 @@ #define SPASM_IMPL_HPP #include +#include #include #include "types.hpp" diff --git a/spasm/src/value.hpp b/spasm/src/value.hpp index 725d48c..a4662f2 100644 --- a/spasm/src/value.hpp +++ b/spasm/src/value.hpp @@ -1,5 +1,6 @@ #pragma once +#include #include #include "string.hpp" -- cgit v1.3.1-23-gd82d