Kaydet (Commit) f2be92b6 authored tarafından Caolán McNamara's avatar Caolán McNamara

remove OUStringHashCode in favor of OUStringHash

(and as always if you find one, you can be sure there
are 6 others in there when you grep for them)

Change-Id: I9296ddbdda266c7b6d8a0ac0bc13ec5b6340cee7
üst dbf2273e
......@@ -39,15 +39,7 @@ namespace desktop
running office without UI.
*/
struct OUStringHashCode
{
size_t operator()( const OUString& sString ) const
{
return sString.hashCode();
}
};
class DispatchWatcherHashMap : public ::boost::unordered_map< OUString, sal_Int32, OUStringHashCode, ::std::equal_to< OUString > >
class DispatchWatcherHashMap : public ::boost::unordered_map< OUString, sal_Int32, OUStringHash, ::std::equal_to< OUString > >
{
public:
inline void free()
......
......@@ -60,16 +60,8 @@ struct FormulaArrayStack
};
struct FORMULA_DLLPUBLIC OUStringHashCode
{
size_t operator()( const OUString& rStr ) const
{
return rtl_ustr_hashCode_WithLength( rStr.getStr(), rStr.getLength() );
}
};
typedef ::boost::unordered_map< OUString, OpCode, OUStringHashCode, ::std::equal_to< OUString > > OpCodeHashMap;
typedef ::boost::unordered_map< OUString, OUString, OUStringHashCode, ::std::equal_to< OUString > > ExternalHashMap;
typedef ::boost::unordered_map< OUString, OpCode, OUStringHash, ::std::equal_to< OUString > > OpCodeHashMap;
typedef ::boost::unordered_map< OUString, OUString, OUStringHash, ::std::equal_to< OUString > > ExternalHashMap;
class FORMULA_DLLPUBLIC FormulaCompiler
{
......
......@@ -46,15 +46,6 @@ using namespace ::com::sun::star::beans ;
#define PROPERTYNAME_CMD OUString("Command")
// Method to retrieve a hash code from a string. May be we have to change it to decrease collisions in the hash map
struct OUStringHashCode
{
size_t operator()( const OUString& sString ) const
{
return sString.hashCode();
}
};
/*-****************************************************************************************************************
@descr support simple command option structures and operations on it
****************************************************************************************************************-*/
......@@ -106,9 +97,9 @@ class SvtCmdOptions
}
private:
class CommandHashMap : public ::boost::unordered_map< OUString ,
class CommandHashMap : public ::boost::unordered_map< OUString ,
sal_Int32 ,
OUStringHashCode ,
OUStringHash ,
::std::equal_to< OUString > >
{
public:
......
......@@ -47,17 +47,9 @@ using namespace ::com::sun::star::uno ;
#define PROPERTYCOUNT 1
struct OUStringHashCode
{
size_t operator()( const OUString& sString ) const
{
return sString.hashCode();
}
};
class ExtensionHashMap : public ::boost::unordered_map< OUString,
sal_Int32,
OUStringHashCode,
OUStringHash,
::std::equal_to< OUString > >
{
public:
......
......@@ -46,15 +46,7 @@ static sal_Int32 nRefCount = 0;
class SvtOptionsDlgOptions_Impl : public utl::ConfigItem
{
private:
struct OUStringHashCode
{
size_t operator()( const OUString& sString ) const
{
return sString.hashCode();
}
};
typedef boost::unordered_map< OUString, sal_Bool, OUStringHashCode, ::std::equal_to< OUString > > OptionNodeList;
typedef boost::unordered_map< OUString, sal_Bool, OUStringHash, ::std::equal_to< OUString > > OptionNodeList;
OUString m_sPathDelimiter;
OptionNodeList m_aOptionNodeList;
......
......@@ -67,21 +67,13 @@ using namespace com::sun::star::lang;
#define STRPOS_NOTFOUND -1
struct OUStringHashCode
{
size_t operator()( const OUString& sString ) const
{
return sString.hashCode();
}
};
enum VarNameProperty
{
VAR_NEEDS_SYSTEM_PATH,
VAR_NEEDS_FILEURL
};
class NameToHandleMap : public ::boost::unordered_map< OUString, sal_Int32, OUStringHashCode, ::std::equal_to< OUString > >
class NameToHandleMap : public ::boost::unordered_map< OUString, sal_Int32, OUStringHash, ::std::equal_to< OUString > >
{
public:
inline void free() { NameToHandleMap().swap( *this ); }
......@@ -93,7 +85,7 @@ class EnumToHandleMap : public ::boost::unordered_map< sal_Int32, sal_Int32, boo
inline void free() { EnumToHandleMap().swap( *this ); }
};
class VarNameToEnumMap : public ::boost::unordered_map< OUString, VarNameProperty, OUStringHashCode, ::std::equal_to< OUString > >
class VarNameToEnumMap : public ::boost::unordered_map< OUString, VarNameProperty, OUStringHash, ::std::equal_to< OUString > >
{
public:
inline void free() { VarNameToEnumMap().swap( *this ); }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment