Skip to content

Commit 5d62b2e

Browse files
authored
Removed unnused size_t for to_string in 32b compiles (#476)
Signed-off-by: Russell McGuire <russell.w.mcguire@intel.com>
1 parent 8cec1d2 commit 5d62b2e

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

scripts/templates/validation/to_string.h.mako

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ inline std::string to_string(uint8_t value) { return std::to_string(static_cast<
7676
inline std::string to_string(uint16_t value) { return std::to_string(value); }
7777
inline std::string to_string(int32_t value) { return std::to_string(value); }
7878
inline std::string to_string(int64_t value) { return std::to_string(value); }
79-
#if SIZE_MAX != UINT64_MAX
79+
#if SIZE_MAX != UINT64_MAX && SIZE_MAX != UINT32_MAX
8080
inline std::string to_string(size_t value) { return std::to_string(value); }
8181
#endif
8282
inline std::string to_string(double value) { return std::to_string(value); }
@@ -110,7 +110,7 @@ inline std::string to_string(const int64_t* ptr) {
110110
if (!ptr) return "nullptr";
111111
return to_string(*ptr);
112112
}
113-
#if SIZE_MAX != UINT64_MAX
113+
#if SIZE_MAX != UINT64_MAX && SIZE_MAX != UINT32_MAX
114114
inline std::string to_string(const size_t* ptr) {
115115
if (!ptr) return "nullptr";
116116
return to_string(*ptr);

source/utils/ze_to_string.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ inline std::string to_string(uint8_t value) { return std::to_string(static_cast<
141141
inline std::string to_string(uint16_t value) { return std::to_string(value); }
142142
inline std::string to_string(int32_t value) { return std::to_string(value); }
143143
inline std::string to_string(int64_t value) { return std::to_string(value); }
144-
#if SIZE_MAX != UINT64_MAX
144+
#if SIZE_MAX != UINT64_MAX && SIZE_MAX != UINT32_MAX
145145
inline std::string to_string(size_t value) { return std::to_string(value); }
146146
#endif
147147
inline std::string to_string(double value) { return std::to_string(value); }
@@ -175,7 +175,7 @@ inline std::string to_string(const int64_t* ptr) {
175175
if (!ptr) return "nullptr";
176176
return to_string(*ptr);
177177
}
178-
#if SIZE_MAX != UINT64_MAX
178+
#if SIZE_MAX != UINT64_MAX && SIZE_MAX != UINT32_MAX
179179
inline std::string to_string(const size_t* ptr) {
180180
if (!ptr) return "nullptr";
181181
return to_string(*ptr);

0 commit comments

Comments
 (0)