Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve BufferManager assertion context args #3223

Open
wants to merge 2 commits into
base: devel
Choose a base branch
from

Conversation

celskeggs
Copy link
Contributor

Related Issue(s) n/a
Has Unit Tests (y/n) n
Documentation Included (y/n) n

Change Description

Previously, in some cases, no information or context was provided when certain assertions tripped. Include more information in several cases.

Rationale

Lack of information in an assertion makes it harder to identify the cause.

Testing/Review Recommendations

N/A

Future Work

N/A

Previously, in some cases, no information or context was provided when
this assertion tripped, which made it harder to identify the cause.
Include more information in several cases.
memorySize == allocatedSize,
FW_ASSERT(memory != nullptr && memorySize == allocatedSize,
mgrId, memId,
static_cast<FwAssertArgType>(reinterpret_cast<FwSizeType>(memory)),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why use reinterpret_cast<FwSizeType> on memory here? Are you looking to print the memory address? We have PlatformPointerCastType to represent pointers as integers

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I somehow didn't realize that type existed! Yes, that's definitely what I want.

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.

2 participants