From bf45ebb1782eba6278efd1d6f032ec5f89385150 Mon Sep 17 00:00:00 2001 From: Rangi42 Date: Thu, 7 Mar 2024 10:22:40 -0500 Subject: [PATCH] Run clang-format to fix some inconsistent style --- include/asm/lexer.hpp | 4 ++-- include/asm/rpn.hpp | 8 ++++---- src/asm/rpn.cpp | 1 - src/asm/section.cpp | 4 +++- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/include/asm/lexer.hpp b/include/asm/lexer.hpp index ab04e2ec..2c65fed2 100644 --- a/include/asm/lexer.hpp +++ b/include/asm/lexer.hpp @@ -9,10 +9,10 @@ #include #include -#include "asm/symbol.hpp" // MAXSYMLEN - #include "platform.hpp" // SSIZE_MAX +#include "asm/symbol.hpp" // MAXSYMLEN + #define MAXSTRLEN 255 #define LEXER_BUF_SIZE 42 // TODO: determine a sane value for this diff --git a/include/asm/rpn.hpp b/include/asm/rpn.hpp index 79f15875..7ae12c1f 100644 --- a/include/asm/rpn.hpp +++ b/include/asm/rpn.hpp @@ -12,10 +12,10 @@ struct Symbol; struct Expression { - int32_t val; // If the expression's value is known, it's here - std::string reason; // Why the expression is not known, if it isn't - bool isKnown; // Whether the expression's value is known at assembly time - bool isSymbol; // Whether the expression represents a symbol suitable for const diffing + int32_t val; // If the expression's value is known, it's here + std::string reason; // Why the expression is not known, if it isn't + bool isKnown; // Whether the expression's value is known at assembly time + bool isSymbol; // Whether the expression represents a symbol suitable for const diffing std::vector *rpn; // Bytes serializing the RPN expression uint32_t rpnPatchSize; // Size the expression will take in the object file diff --git a/src/asm/rpn.cpp b/src/asm/rpn.cpp index f0e9ae61..64f6ad6d 100644 --- a/src/asm/rpn.cpp +++ b/src/asm/rpn.cpp @@ -353,7 +353,6 @@ void rpn_BinaryOp( // First, check if the expression is known expr.isKnown = src1.isKnown && src2.isKnown; if (expr.isKnown) { - // If both expressions are known, just compute the value uint32_t uleft = src1.val, uright = src2.val; diff --git a/src/asm/section.cpp b/src/asm/section.cpp index 1f743549..9c1361f6 100644 --- a/src/asm/section.cpp +++ b/src/asm/section.cpp @@ -249,7 +249,9 @@ static void mergeSections( unsigned int nbSectErrors = 0; if (type != sect.type) - sectError("Section already exists but with type %s\n", sectionTypeInfo[sect.type].name.c_str()); + sectError( + "Section already exists but with type %s\n", sectionTypeInfo[sect.type].name.c_str() + ); if (sect.modifier != mod) { sectError("Section already declared as %s section\n", sectionModNames[sect.modifier]);