https://bugs.documentfoundation.org/show_bug.cgi?id=97499
Bug ID: 97499
Summary: EasyHack: Clean up default arguments in uses of C++
unordered containers
Product: LibreOffice
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: enhancement
Priority: medium
Component: LibreOffice
Assignee: libreoffice-bugs@lists.freedesktop.org
Reporter: sbergman@redhat.com
CC: libreoffice@lists.freedesktop.org
The standard C++ unordered containers (like std::unordered_map) have additional
template parameters Hash and Pred that default to std::hash<Key> and
std::equal_to<Key>, respectively.
So these can be removed where they are redundantly specified in the code base,
as in
--- a/include/comphelper/numberedcollection.hxx
+++ b/include/comphelper/numberedcollection.hxx
@@ -61,9 +61,7 @@ class COMPHELPER_DLLPUBLIC NumberedCollection : private ::cppu::BaseMutex
typedef std::unordered_map<
long,
- TNumberedItem,
- ::std::hash<long>,
- ::std::equal_to< long > > TNumberedItemHash;
+ TNumberedItem > TNumberedItemHash;
typedef ::std::vector< long > TDeadItemList;
--
You are receiving this mail because:
You are on the CC list for the bug.
Context
- [Bug 97499] New: EasyHack: Clean up default arguments in uses of C++ unordered containers · bugzilla-daemon
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.