Skip to content

Commit

Permalink
Merge pull request #5 from BillyONeal/port-vcpkg
Browse files Browse the repository at this point in the history
Avoid C++20 designated initializers.
  • Loading branch information
lganzzzo authored Nov 4, 2020
2 parents ebfad69 + 83b6261 commit 6f7a227
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/oatpp-mongo/bson/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ Utils::BO_TYPE Utils::FLOAT_BO = detectFloatBO();

Utils::BO_TYPE Utils::detectIntBO() {
BO_TYPE result = BO_TYPE::UNKNOWN;
BO_CHECK check {.i64 = 255};
BO_CHECK check;
check.i64 = 255;
if(check.bytes[0] == 255) {
result = BO_TYPE::LITTLE;
} else if(check.bytes[7] == 255) {
Expand All @@ -45,7 +46,8 @@ Utils::BO_TYPE Utils::detectIntBO() {

Utils::BO_TYPE Utils::detectFloatBO() {
BO_TYPE result = BO_TYPE::UNKNOWN;
BO_CHECK check {.f64 = 2.0};
BO_CHECK check;
check.f64 = 2.0;
if(check.bytes[0] > 0) {
result = BO_TYPE::NETWORK;
} else if(check.bytes[7] > 0) {
Expand Down

0 comments on commit 6f7a227

Please sign in to comment.