8000 Added detail namespace to prevent json namespace conflicts by DavidSM64 · Pull Request #407 · syoyo/tinygltf · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Added detail namespace to prevent json namespace conflicts #407

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

Merged
merged 3 commits into from
Feb 18, 2023

Conversation

DavidSM64
Copy link
Contributor

Fixes issue #406

Ran parser & unit tests, and it all passed.

Don't even need to rename json in this case. For some weird reason it has to use ::detail::json instead of detail::json. I have no idea why.

@syoyo
Copy link
Owner
syoyo commented Feb 18, 2023

@DavidSM64 Thanks! But it fails to compile with rapidjson backend.

Also, let me give some to resolve ::detail namespace scope issue. We should be able to make it details::

@DavidSM64
Copy link
Contributor Author
DavidSM64 commented Feb 18, 2023

RapidJSON should be fixed now hopefully. Going to look into the ::detail issue.

Edit: Ah, found the issue. Forgot to add namespace tinygltf { above a namespace detail {. This should be good to go now if you don't have any other issues with it.

@syoyo
Copy link
Owner
syoyo commented Feb 18, 2023

@DavidSM64 Thanks!

RapidJSON should be fixed now hopefully.

Awesome!

Forgot to add namespace tinygltf { above a namespace detail {

Oh, some JSON stuff was defined in global unnamed namespace scope and n 8000 ot wrapped by tinygltf namespace 😅

https://en.cppreference.com/w/cpp/language/namespace#Unnamed_namespaces

Your PR makes it better.

@syoyo syoyo merged commit 84a83d3 into syoyo:release Feb 18, 2023
@syoyo
Copy link
Owner
syoyo commented Feb 18, 2023

@DavidSM64 Confirmed CI build passes, so merged! Thank you for the contribution!

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
0