Skip to content

Commit

Permalink
Update Version.h (#75)
Browse files Browse the repository at this point in the history
Use curly braces in member initialisation. 
"major" and "minor" are macros defined by the gcc compiler. The macros are defined in sys/sysmacros.h which is getting pulled in by #include <string> 
Using curly braces stops the macro from being expanded.
  • Loading branch information
KrzysztofDomanski committed Aug 10, 2021
1 parent c5c133f commit 05718d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GLTFSDK/Inc/GLTFSDK/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace Microsoft
uint32_t major;
uint32_t minor;

constexpr Version(uint32_t major, uint32_t minor) : major(major), minor(minor)
constexpr Version(uint32_t major, uint32_t minor) : major{major}, minor{minor}
{
}

Expand Down

0 comments on commit 05718d5

Please sign in to comment.