From 166753d8e00e11d2fa92d3bfbe5667ad4b8f7b9d Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 7 Mar 2019 16:57:52 +0100 Subject: rcc: Avoid needless use of macro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit strlen on literals gets typically optimized out nowadays. Adjust callee side to handle the off-by-one between sizeof(literal) and strlen(). Change-Id: I1551f69a160922681d66024701ba1bd8f6dc03bf Reviewed-by: Jörg Bornemann --- src/tools/rcc/rcc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/tools/rcc/rcc.h') diff --git a/src/tools/rcc/rcc.h b/src/tools/rcc/rcc.h index b301355e4f..190c37a1f6 100644 --- a/src/tools/rcc/rcc.h +++ b/src/tools/rcc/rcc.h @@ -143,6 +143,7 @@ private: void writeChar(char c) { m_out.append(c); } void writeByteArray(const QByteArray &); void write(const char *, int len); + void writeString(const char *s) { write(s, static_cast(strlen(s))); } #if QT_CONFIG(zstd) ZSTD_CCtx *m_zstdCCtx; -- cgit v1.2.3