Skip to content

Commit 2f5da74

Browse files
committed
Remove definition of PRI?64 in util.h
This was a bad idea. This can't be solved with macros as any other library that includes inttypes.h will get in the way. The parent commit has removed all usages from the source, this commit removes the definition.
1 parent f48742c commit 2f5da74

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/util.h

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,17 @@ static const int64_t CENT = 1000000;
4444
#define UEND(a) ((unsigned char*)&((&(a))[1]))
4545
#define ARRAYLEN(array) (sizeof(array)/sizeof((array)[0]))
4646

47-
/* Format characters for (s)size_t, ptrdiff_t, uint64_t.
47+
/* Format characters for (s)size_t, ptrdiff_t.
4848
*
49-
* As the tinyformat-based formatting system is type-safe, no special format
50-
* characters are really needed to specify sizes. Tinyformat can support
51-
* (ignores) the C99 prefixes such as "ll" but chokes on MSVC's inttypes
52-
* defines prefixes such as "I64X". So don't include inttypes.h and define our
53-
* own for compatibility.
54-
* If you get a warning here about a redefine of PRI?64, make sure that
55-
* inttypes.h is not included.
49+
* Define these as empty as the tinyformat-based formatting system is
50+
* type-safe, no special format characters are needed to specify sizes.
5651
*/
5752
#define PRIszx "x"
5853
#define PRIszu "u"
5954
#define PRIszd "d"
6055
#define PRIpdx "x"
6156
#define PRIpdu "u"
6257
#define PRIpdd "d"
63-
#define PRIx64 "x"
64-
#define PRIu64 "u"
65-
#define PRId64 "d"
6658

6759
// This is needed because the foreach macro can't get over the comma in pair<t1, t2>
6860
#define PAIRTYPE(t1, t2) std::pair<t1, t2>

0 commit comments

Comments
 (0)