From 0914c91284b6ccc7e0a71fc06db811be599e677a Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 28 Jun 2014 19:53:15 -0700 Subject: [PATCH] Don't use deprecated API. --- format.h | 2 +- test/format-test.cc | 2 +- test/util-test.cc | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/format.h b/format.h index 9f288bb5..14d37161 100644 --- a/format.h +++ b/format.h @@ -1611,7 +1611,7 @@ template void format(BasicWriter &w, const FormatSpec &spec, const T &value) { std::basic_ostringstream os; os << value; - w.Write(os.str(), spec); + w.write(os.str(), spec); } namespace internal { diff --git a/test/format-test.cc b/test/format-test.cc index a8367c77..1ca340a4 100644 --- a/test/format-test.cc +++ b/test/format-test.cc @@ -1324,7 +1324,7 @@ class Answer {}; template void format(BasicWriter &w, const fmt::FormatSpec &spec, Answer) { - w.Write("42", spec); + w.write("42", spec); } TEST(FormatterTest, CustomFormat) { diff --git a/test/util-test.cc b/test/util-test.cc index 66ee4727..3d7ad9bf 100644 --- a/test/util-test.cc +++ b/test/util-test.cc @@ -206,8 +206,8 @@ void CheckThrowError(int error_code, FormatErrorMessage format, TEST(UtilTest, FormatSystemErrorMessage) { fmt::Writer message; fmt::internal::FormatSystemErrorMessage(message, EDOM, "test"); - EXPECT_EQ(str(fmt::Format("test: {}") - << GetSystemErrorMessage(EDOM)), fmt::str(message)); + EXPECT_EQ(str(fmt::format("test: {}", + GetSystemErrorMessage(EDOM))), fmt::str(message)); } TEST(UtilTest, SystemErrorSink) { @@ -240,7 +240,7 @@ TEST(UtilTest, FormatWinErrorMessage) { fmt::Writer actual_message; fmt::internal::FormatWinErrorMessage( actual_message, ERROR_FILE_EXISTS, "test"); - EXPECT_EQ(str(fmt::Format("test: {}") << fmt::str(utf8_message)), + EXPECT_EQ(str(fmt::format("test: {}", fmt::str(utf8_message))), fmt::str(actual_message)); }