Skip to content
Closed
Prev Previous commit
Next Next commit
fixup! src: add C++-style sprintf utility
Co-Authored-By: Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information
addaleax and bnoordhuis authored Jan 22, 2020
commit a851023758af8a8b11d90784df2681e48d37a751
2 changes: 1 addition & 1 deletion src/debug_utils-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ template <typename Arg, typename... Args>
std::string COLD_NOINLINE SPrintFImpl( // NOLINT(runtime/string)
const char* format, Arg&& arg, Args&&... args) {
const char* p = strchr(format, '%');
CHECK_NOT_NULL(p);
CHECK_NOT_NULL(p); // If you hit this, you passed in too many arguments.
std::string ret(format, p);
// Ignore long / size_t modifiers
while (strchr("lz", *++p) != nullptr) {}
Expand Down