Skip to content

Commit

Permalink
use static_cast instead of C-style cast
Browse files Browse the repository at this point in the history
  • Loading branch information
herzbube committed Jan 1, 2024
1 parent fff4bd8 commit 87d7980
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/sgfc/frontend/SgfcDocumentReadResult.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ namespace LibSgfcPlusPlus

void SgfcDocumentReadResult::DebugPrintToConsole() const
{
std::cout << "Exit code = " << (int)GetExitCode() << std::endl;
std::cout << "Exit code = " << static_cast<int>(GetExitCode()) << std::endl;
std::cout << "IsSgfDataValid = " << IsSgfDataValid() << std::endl;

for (auto parseResultMessage : GetParseResult())
Expand All @@ -78,7 +78,7 @@ namespace LibSgfcPlusPlus
<< "Message ID = "
<< static_cast<int>(parseResultMessage->GetMessageID())
<< ", type = "
<< (int)parseResultMessage->GetMessageType()
<< static_cast<int>(parseResultMessage->GetMessageType())
<< ", line = "
<< parseResultMessage->GetLineNumber()
<< ", column = "
Expand Down
4 changes: 2 additions & 2 deletions src/sgfc/frontend/SgfcDocumentWriteResult.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ namespace LibSgfcPlusPlus

void SgfcDocumentWriteResult::DebugPrintToConsole() const
{
std::cout << "Exit code = " << (int)GetExitCode() << std::endl;
std::cout << "Exit code = " << static_cast<int>(GetExitCode()) << std::endl;

for (auto parseResultMessage : GetParseResult())
{
std::cout
<< "Message ID = "
<< static_cast<int>(parseResultMessage->GetMessageID())
<< ", type = "
<< (int)parseResultMessage->GetMessageType()
<< static_cast<int>(parseResultMessage->GetMessageType())
<< ", line = "
<< parseResultMessage->GetLineNumber()
<< ", column = "
Expand Down

0 comments on commit 87d7980

Please sign in to comment.