[Scummvm-git-logs] scummvm master -> 092cb26b501750e5c37b7687a4242449835d2ddf

lephilousophe noreply at scummvm.org
Sun Sep 18 20:47:57 UTC 2022


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
092cb26b50 Revert "COMMON: Avoid passing U32String full object as parameter"


Commit: 092cb26b501750e5c37b7687a4242449835d2ddf
    https://github.com/scummvm/scummvm/commit/092cb26b501750e5c37b7687a4242449835d2ddf
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2022-09-18T22:46:54+02:00

Commit Message:
Revert "COMMON: Avoid passing U32String full object as parameter"

This reverts commit 64675dbba6a885c4f3a19b0e3d777a9c23a10d37.
It fails on MSVC with error:
C2338    static_assert failed: 'va_start argument must not have reference type and must not be parenthesized'

Changed paths:
    common/ustr.cpp
    common/ustr.h


diff --git a/common/ustr.cpp b/common/ustr.cpp
index 081acc607bf..ee7afeea83b 100644
--- a/common/ustr.cpp
+++ b/common/ustr.cpp
@@ -145,7 +145,7 @@ void U32String::insertString(const String &s, uint32 p, CodePage page) {
 	insertString(U32String(s, page), p);
 }
 
-U32String U32String::format(const U32String &fmt, ...) {
+U32String U32String::format(U32String fmt, ...) {
 	U32String output;
 
 	va_list va;
diff --git a/common/ustr.h b/common/ustr.h
index 82fd318e71b..904a34cdcab 100644
--- a/common/ustr.h
+++ b/common/ustr.h
@@ -137,7 +137,7 @@ public:
 	 * Similar to sprintf, except that it stores the result
 	 * in a (variably sized) string instead of a fixed-size buffer.
 	 */
-	static U32String format(const U32String &fmt, ...);
+	static U32String format(U32String fmt, ...);
 
 	/** @overload **/
 	static U32String format(const char *fmt, ...);




More information about the Scummvm-git-logs mailing list