Repository navigation
feat(image-utils): rewrite C++ code to better adhere to standards - #61
Merged
Merged
Conversation
- Remove "using" directive and instead use emscripten namespace - Include C/C++ std headers when necessary - Use std::equal instead of memcpy - Use std namespace for C std functions - Use std::optional in more reasonable way - Rename constants based on C++ naming scheme
- make variables in codecs more consistent - make kJfifHeader and kAdobeHeader use the ASCII form - Make all codec getters noexcept
✅ Deploy Preview for exifi ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for exifi-api ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I found the Google C++ style guide: https://google.github.io/styleguide/cppguide.html
There is still a lot of malloc/free since I don't want to bring in unnecessary vector code, and if I use string methods, emscripten will return it as a Int8Array. Even if I cast in runtime, I'm not really comfortable with bringing in more string methods into the Wasm bundle since this code is so simple it really shouldn't be necessary.