Skip to content

Commit

Permalink
Revert "[libc++][format] Use a helper constant."
Browse files Browse the repository at this point in the history
This reverts commit 8242768.

This seems to break the AIX-32 bit build.
  • Loading branch information
mordante committed Apr 7, 2022
1 parent c29a51b commit b05027a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions libcxx/include/__format/formatter_pointer.h
Expand Up @@ -46,12 +46,10 @@ class _LIBCPP_TEMPLATE_VIS __formatter_pointer : public __parser_pointer<_CharT>
// but that code isn't public. Making that code public requires some
// refactoring.
// TODO FMT Remove code duplication.
constexpr size_t __max_hex_digits = 2 * sizeof(uintptr_t);
char __buffer[2 + __max_hex_digits];
char __buffer[2 + 2 * sizeof(uintptr_t)];
__buffer[0] = '0';
__buffer[1] = 'x';
char* __last =
__to_buffer(__buffer + 2, _VSTD::end(__buffer), reinterpret_cast<uintptr_t>(__ptr), __max_hex_digits);
char* __last = __to_buffer(__buffer + 2, _VSTD::end(__buffer), reinterpret_cast<uintptr_t>(__ptr), 16);

unsigned __size = __last - __buffer;
if (__size >= this->__width)
Expand Down

0 comments on commit b05027a

Please sign in to comment.