Skip to content

add -DNOMINMAX to both WIN32 and WIN64 #810

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 7 commits into from
Jan 12, 2022
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion firestore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ add_custom_target(
# are guarded by this flag, such as GetUserAgent and function_registry.
set(FIREBASE_FIRESTORE_CPP_DEFINES -DINTERNAL_EXPERIMENTAL=1)

if (WIN32 AND NOT ANDROID AND NOT IOS)
if (MSVC AND NOT ANDROID AND NOT IOS)
# On Windows, gRPC gives a compiler error in firebase_metadata_provider_desktop.cc
# unless _WIN32_WINNT is defined to this value (0x0600, Windows Vista).
# Also set -DNOMINMAX for both Firestore and Firestore Core.
Expand Down
4 changes: 2 additions & 2 deletions firestore/src/include/firebase/firestore/field_value.h
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ class FieldValue final {
// Note: Doxygen will run into trouble if this function's definition is
// moved outside the class body.
static_assert(
std::numeric_limits<T>::max() <= std::numeric_limits<int64_t>::max(),
(std::numeric_limits<T>::max)() <= (std::numeric_limits<int64_t>::max)(),
"The integer type you provided is larger than can fit in an int64_t. "
"If you are sure the value will not be truncated, please explicitly "
"cast to int64_t before passing it to FieldValue::Increment().");
Expand Down Expand Up @@ -377,7 +377,7 @@ class FieldValue final {
// Note: Doxygen will run into trouble if this function's definition is
// moved outside the class body.
static_assert(
std::numeric_limits<T>::max() <= std::numeric_limits<double>::max(),
(std::numeric_limits<T>::max)() <= (std::numeric_limits<double>::max)(),
"The floating point type you provided is larger than can fit in a "
"double. If you are sure the value will not be truncated, please "
"explicitly cast to double before passing it to "
Expand Down