summaryrefslogtreecommitdiff
path: root/ZAPD/OutputFormatter.cpp
diff options
context:
space:
mode:
authorlouist103 <35883445+louist103@users.noreply.github.com>2021-04-24 16:42:52 -0400
committerGitHub <noreply@github.com>2021-04-24 16:42:52 -0400
commit6d27dbaab3b32ccebb076895fac3cc6aa3240d6c (patch)
tree601c6ab5bef2f93b6d6ef4ba5506eb04dfb59c9f /ZAPD/OutputFormatter.cpp
parentee8bdea252db4c764f4a2567c32754118fdce10b (diff)
Fix most -Wall warnings (#115)
* started on basic type errors * Done. For now * remove libgfxd binary * Most warnings fixed * Fix conflicts and new warnings * Makefile * Sig * Clang format * destructor * Add a bunch of destructors * clear the scalars vector after freeing the elements * PR fixes (Anghelo Alf) * Fix most clang -Wall warnings
Diffstat (limited to 'ZAPD/OutputFormatter.cpp')
-rw-r--r--ZAPD/OutputFormatter.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/ZAPD/OutputFormatter.cpp b/ZAPD/OutputFormatter.cpp
index 33fcb54..32a48f6 100644
--- a/ZAPD/OutputFormatter.cpp
+++ b/ZAPD/OutputFormatter.cpp
@@ -7,9 +7,9 @@ void OutputFormatter::Flush()
str.append(1, '\n');
str.append(currentIndent, ' ');
- int newCol = currentIndent + (wordP - word);
+ uint32_t newCol = currentIndent + (wordP - word);
- for (int i = 0; i < wordNests; i++)
+ for (uint32_t i = 0; i < wordNests; i++)
nestIndent[nest - i] -= col - newCol;
col = newCol;
@@ -25,9 +25,9 @@ void OutputFormatter::Flush()
wordNests = 0;
}
-int OutputFormatter::Write(const char* buf, int count)
+int OutputFormatter::Write(const char* buf, uint32_t count)
{
- for (int i = 0; i < count; i++)
+ for (uint32_t i = 0; i < count; i++)
{
char c = buf[i];
@@ -96,7 +96,7 @@ int (*OutputFormatter::StaticWriter())(const char* buf, int count)
return &WriteStatic;
}
-OutputFormatter::OutputFormatter(int tabSize, int defaultIndent, int lineLimit)
+OutputFormatter::OutputFormatter(uint32_t tabSize, uint32_t defaultIndent, uint32_t lineLimit)
: tabSize{tabSize}, defaultIndent{defaultIndent}, lineLimit{lineLimit}, col{0}, nest{0},
nestIndent{defaultIndent}, currentIndent{defaultIndent}, wordNests(0), wordP{word}, spaceP{space}
{