Skip to content

Fixing negative number printing in main.cpp#59

Merged
reecewayt merged 1 commit into
mainfrom
fix-neg-number-printing
Jun 6, 2025
Merged

Fixing negative number printing in main.cpp#59
reecewayt merged 1 commit into
mainfrom
fix-neg-number-printing

Conversation

@reecewayt

Copy link
Copy Markdown
Collaborator

Many of these changes are because of clang format. The only functional change I made was to the register printing in main.cpp by adding a static cast:

// Print registers that have been used
    for (auto item = final_registers_.begin(); item != final_registers_.end(); item++) {
        std::cout << "\tR" << std::to_string(*item) << ": "
                  << std::to_string(static_cast<int32_t>(rf.read(*item))) << "\n";
    }

@tnl3pdx tnl3pdx left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks for fixing up the printing!

@nkanderson nkanderson left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thank you!

@eceteresa

Copy link
Copy Markdown
Collaborator

Nice! Thank you for diving back into the program and finding that :)

@reecewayt
reecewayt merged commit 9a06f7b into main Jun 6, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants