Skip to content

Commit

Permalink
Avoid some type conversion warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
unknownbrackets committed Jan 17, 2022
1 parent 8d2ddfa commit b1c332e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Core/ExpressionFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ ExpressionValue expFuncReadAscii(const Identifier &funcName, const std::vector<E
return ExpressionValue();
}

for (size_t i = 0; i < file.gcount(); i++)
for (std::streamsize i = 0; i < file.gcount(); i++)
{
if (buffer[i] == 0x00)
{
Expand Down
2 changes: 1 addition & 1 deletion Core/Misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ void TempData::start()
file.writeFormat("; %d %S\n\n",equCount,equCount == 1 ? "equation" : "equations");
for (size_t i = 0; i < fileCount; i++)
{
file.writeFormat("; %S\n",Global.fileList.string(i));
file.writeFormat("; %S\n",Global.fileList.string(int(i)));
}
file.writeLine("");
}
Expand Down
2 changes: 1 addition & 1 deletion Core/SymbolTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,5 +221,5 @@ int SymbolTable::findSection(int64_t address)
}
}

return smallestBefore;
return int(smallestBefore);
}
2 changes: 1 addition & 1 deletion Util/FileClasses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ bool TextFile::open(Mode mode, Encoding defaultEncoding)

if (mode == Read)
{
size_ = fs::file_size(fileName);
size_ = long(fs::file_size(fileName));

stream.read(reinterpret_cast<char *>(numBuffer), 3);
switch (numBuffer[0] | (numBuffer[1] << 8))
Expand Down

0 comments on commit b1c332e

Please sign in to comment.