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: [email protected]
          Reporter: [email protected]
                CC: [email protected]

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.
_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to