Skip to content

Commit c01efdc

Browse files
jbmscopybara-github
authored andcommitted
Fix MSVC warnings related to data type macros
PiperOrigin-RevId: 562991858 Change-Id: I53cefe9cae4913d66035286262f0b9380aa1deb9
1 parent 2fc1698 commit c01efdc

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

tensorstore/data_type.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ struct NumericUstringConvertDataType {
290290

291291
} // namespace internal_data_type
292292

293-
#define TENSORSTORE_INTERNAL_CONVERT_INT(T) \
293+
#define TENSORSTORE_INTERNAL_CONVERT_INT(T, ...) \
294294
template <> \
295295
struct ConvertDataType<::tensorstore::dtypes::T, \
296296
::tensorstore::dtypes::string_t> \
@@ -305,7 +305,7 @@ struct NumericUstringConvertDataType {
305305
: public internal_data_type::JsonIntegerConvertDataType {}; \
306306
/**/
307307

308-
#define TENSORSTORE_INTERNAL_CONVERT_FLOAT(T) \
308+
#define TENSORSTORE_INTERNAL_CONVERT_FLOAT(T, ...) \
309309
template <> \
310310
struct ConvertDataType<::tensorstore::dtypes::T, \
311311
::tensorstore::dtypes::string_t> \

tensorstore/data_type_conversion_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ using ::tensorstore::internal::GetElementCopyErrorStatus;
4949
using ::tensorstore::internal::IterationBufferKind;
5050
using ::tensorstore::internal::IterationBufferPointer;
5151

52-
#define X(T) \
52+
#define X(T, ...) \
5353
using ::tensorstore::dtypes::T; \
5454
/**/
5555
TENSORSTORE_FOR_EACH_DATA_TYPE(X)

tensorstore/data_type_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ using ::tensorstore::internal::IterationBufferPointer;
5454
using ::tensorstore::serialization::SerializationRoundTrip;
5555
using ::tensorstore::serialization::TestSerializationRoundTrip;
5656

57-
#define X(T) \
57+
#define X(T, ...) \
5858
using ::tensorstore::dtypes::T; \
5959
static_assert(static_cast<int>(DataTypeId::T) >= 0 && \
6060
static_cast<int>(DataTypeId::T) < \
@@ -90,7 +90,7 @@ static_assert(IsElementType<int (ClassT::*)(int)>);
9090

9191
TEST(ElementOperationsTest, DataTypeIdOrder) {
9292
int i = 0;
93-
#define X(T) EXPECT_EQ(i++, static_cast<int>(DataTypeId::T));
93+
#define X(T, ...) EXPECT_EQ(i++, static_cast<int>(DataTypeId::T));
9494
TENSORSTORE_FOR_EACH_DATA_TYPE(X)
9595
#undef X
9696
}

0 commit comments

Comments
 (0)