Fixed build.

This commit is contained in:
Branimir Karadžić
2018-11-11 21:28:27 -08:00
parent 43f530b4ec
commit 9c75dfec84
3 changed files with 16 additions and 4 deletions

View File

@@ -266,7 +266,10 @@ namespace bx
int32_t write(WriterI* _writer, const StringView& _format, va_list _argList, Error* _err);
///
int32_t write(WriterI* _writer, Error* _err, const StringView& _format, ...);
int32_t write(WriterI* _writer, Error* _err, const StringView* _format, ...);
///
int32_t write(WriterI* _writer, Error* _err, const char* _format, ...);
/// Write repeat the same value.
int32_t writeRep(WriterI* _writer, uint8_t _byte, int32_t _size, Error* _err = NULL);

View File

@@ -1106,10 +1106,19 @@ namespace bx
return size;
}
int32_t write(WriterI* _writer, Error* _err, const StringView& _format, ...)
int32_t write(WriterI* _writer, Error* _err, const StringView* _format, ...)
{
va_list argList;
va_start(argList, &_format);
va_start(argList, _format);
int32_t total = write(_writer, *_format, argList, _err);
va_end(argList);
return total;
}
int32_t write(WriterI* _writer, Error* _err, const char* _format, ...)
{
va_list argList;
va_start(argList, _format);
int32_t total = write(_writer, _format, argList, _err);
va_end(argList);
return total;

View File

@@ -188,5 +188,5 @@ TEST_CASE("vsnprintf write")
REQUIRE(len == 4);
bx::StringView str(tmp, len);
REQUIRE(0 == bx::strCmp(str, "1389"));
REQUIRE(0 == bx::strCmp(str, "1389") );
}