diff options
author | Albert Astals Cid <aacid@kde.org> | 2024-02-08 00:36:51 +0100 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2024-03-30 10:45:35 +0000 |
commit | e803b3714a44001ac1e001d948ae505b24086b66 (patch) | |
tree | 8ac11864c290e3a9d65f72f23fded2aa39bd07cf | |
parent | 9ace4f33e38fe24add87dc4e7c2a43e1441f2bec (diff) |
Fix clang-tidy-17 "unnecessary temporary object created while calling emplace_back"
Says modernize-use-emplace
No need to pass the c, we will set it later so we can just use the
default constructed CharCodeToUnicodeString
-rw-r--r-- | poppler/CharCodeToUnicode.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/poppler/CharCodeToUnicode.cc b/poppler/CharCodeToUnicode.cc index 6035a6ac..7c92e0ac 100644 --- a/poppler/CharCodeToUnicode.cc +++ b/poppler/CharCodeToUnicode.cc @@ -13,7 +13,7 @@ // All changes made under the Poppler project to this file are licensed // under GPL version 2 or later // -// Copyright (C) 2006, 2008-2010, 2012, 2018-2022 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2006, 2008-2010, 2012, 2018-2022, 2024 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2007 Julien Rebetez <julienr@svn.gnome.org> // Copyright (C) 2007 Koji Otani <sho@bbr.jp> // Copyright (C) 2008 Michael Vrable <mvrable@cs.ucsd.edu> @@ -504,7 +504,7 @@ void CharCodeToUnicode::setMapping(CharCode c, Unicode *u, int len) } } if (!element) { - sMap.emplace_back(CharCodeToUnicodeString { c, {} }); + sMap.emplace_back(); element = std::ref(sMap.back()); } map[c] = 0; |