Skip to content

Cast to int format error v2#167

Closed
shewitt-au wants to merge 3 commits intoWerWolv:masterfrom
shewitt-au:cast-to-int-format-error-v2
Closed

Cast to int format error v2#167
shewitt-au wants to merge 3 commits intoWerWolv:masterfrom
shewitt-au:cast-to-int-format-error-v2

Conversation

@shewitt-au
Copy link
Contributor

@shewitt-au shewitt-au commented May 24, 2025

Another attempt at a fix for Cast to int format error (Format function no longer accepts enums) #166

Took me a few goes to get this. In the end it was pretty simple. Hope it works. It does for me.

The usual disclaimers. I don't know the code base well, etc...

It does smell a bit hacky, but by far the the simplest solutuon out of the ones I tired. Perhaps a better one would be to use enable_shared_from_this on the Pattern class. This would requite that Pattern is mangaged be a shared_ptr.

I have added as PR for second method. I prefer this one, although both work.

@shewitt-au shewitt-au marked this pull request as ready for review May 24, 2025 15:42
@WerWolv
Copy link
Owner

WerWolv commented May 25, 2025

I actually wasn't aware of std::enable_shared_from_this! I believe that would actually solve our issue entirely. Let me play around with that a bit
Thanks a lot!

@shewitt-au
Copy link
Contributor Author

shewitt-au commented May 25, 2025

I'm about to push a PR. Waiting for all checks to pass.

@shewitt-au
Copy link
Contributor Author

Passed test.

PR

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