-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[C++] Refactor Guid to use std::array instead of std::vector #3316
Conversation
@mike-lischke PTAL |
00f5893
to
1d04938
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love the patch. You even took care to fix the wrong formatting.
The only thing I wonder about is: should we use static_cast instead of the C-style casts everywhere? I should have used static casts from the beginning.
Yeah, we should use static_cast. Let me fix the remainder. |
1d04938
to
1662d2f
Compare
Changed the remainder in operator<< to use static_cast instead of C-style cast. |
Am I supposed to mirror changes into runtime-testsuite/target/classes/Cpp? |
nvm that looks to be auto-generated. Looks like I need to figure out why its using an old version. |
Nvm, its good. Github decided to email me about previous attempts which I knew were going to fail. |
@parrt This is a C++ only patch. It can be merged for the upcoming release oder after that. Either is fine for me. |
I could swear I merged this manually but will do it formally with github |
Use std::array instead of std::vector. The size of GUIDs is static and always 16-bytes. Using std::array allows us to avoid heap allocations. This also moves Guid out of the global namespace and into antlrcpp.