diff options
author | hjk <hjk@qt.io> | 2019-03-07 16:57:52 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2019-05-28 12:30:11 +0200 |
commit | 166753d8e00e11d2fa92d3bfbe5667ad4b8f7b9d (patch) | |
tree | 529bf2a40ab678528388ad98a49ec00826e1cc6b /src/tools/rcc/rcc.h | |
parent | 242bc539ab6d9e76e1f67f2a51918c79970c2788 (diff) |
rcc: Avoid needless use of macro
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 <joerg.bornemann@qt.io>
Diffstat (limited to 'src/tools/rcc/rcc.h')
-rw-r--r-- | src/tools/rcc/rcc.h | 1 |
1 files changed, 1 insertions, 0 deletions
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<int>(strlen(s))); } #if QT_CONFIG(zstd) ZSTD_CCtx *m_zstdCCtx; |