From 1c80e99dd5b23ebc3f10c768857a21887ab9f090 Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Mon, 29 Jan 2018 09:50:47 -0500 Subject: Allow printf style var args for messages in REPORTER_ASSERT. Remove REPORTER_ASSERT_MESSAGE. Change-Id: I6d00715901159c93e22d182fe24aac92b5fdbcf4 Reviewed-on: https://skia-review.googlesource.com/100361 Commit-Queue: Brian Salomon Reviewed-by: Mike Klein --- include/core/SkString.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/core/SkString.h b/include/core/SkString.h index b96efe730b..3d2373758d 100644 --- a/include/core/SkString.h +++ b/include/core/SkString.h @@ -272,6 +272,9 @@ private: /// Creates a new string and writes into it using a printf()-style format. SkString SkStringPrintf(const char* format, ...); +/// This makes it easier to write a caller as a VAR_ARGS function where the format string is +/// optional. +static inline SkString SkStringPrintf() { return SkString(); } // Specialized to take advantage of SkString's fast swap path. The unspecialized function is // declared in SkTypes.h and called by SkTSort. -- cgit v1.2.3