diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2011-02-05 18:49:26 +0100 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2011-02-06 01:00:47 +0100 |
commit | 7685200dc1f5c6408cda8c89eedf275ca05708fd (patch) | |
tree | 1a0a04d4debcb79ca0a540af78b65f5df56d6841 /crashrep/source | |
parent | 37823fe2b4474eca6e8a775668af6bca21e2af55 (diff) |
move components to boost unordered containers
Diffstat (limited to 'crashrep/source')
-rw-r--r-- | crashrep/source/unx/main.cxx | 26 | ||||
-rw-r--r-- | crashrep/source/win32/soreport.cpp | 10 |
2 files changed, 18 insertions, 18 deletions
diff --git a/crashrep/source/unx/main.cxx b/crashrep/source/unx/main.cxx index b967206e369a..7c7df75ec53e 100644 --- a/crashrep/source/unx/main.cxx +++ b/crashrep/source/unx/main.cxx @@ -40,7 +40,7 @@ #include <pthread.h> #include <limits.h> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <vector> #include <string> @@ -182,7 +182,7 @@ static size_t fcopy( FILE *fpout, FILE *fpin ) from which it can be reviewed and sent */ -bool write_report( const hash_map< string, string >& rSettings ) +bool write_report( const boost::unordered_map< string, string >& rSettings ) { FILE *fp = fopen( tmpnam( g_szReportFile ), "w" ); const char *pszUserType = getenv( "STAROFFICE_USERTYPE" ); @@ -249,7 +249,7 @@ bool write_report( const hash_map< string, string >& rSettings ) } -bool write_description( const hash_map< string, string >& rSettings ) +bool write_description( const boost::unordered_map< string, string >& rSettings ) { bool bSuccess = false; FILE *fp = fopen( tmpnam( g_szDescriptionFile ), "w" ); @@ -267,17 +267,17 @@ bool write_description( const hash_map< string, string >& rSettings ) #if 0 // unused -static void printSettings( const hash_map<string,string>& rSettings ) +static void printSettings( const boost::unordered_map<string,string>& rSettings ) { printf( "Settings:\n" ); - for( hash_map<string,string>::const_iterator it = rSettings.begin(); it != rSettings.end(); ++it ) + for( boost::unordered_map<string,string>::const_iterator it = rSettings.begin(); it != rSettings.end(); ++it ) { printf( "%s=\"%s\"\n", it->first.c_str(), it->second.c_str() ); } } #endif -bool save_crash_report( const string& rFileName, const hash_map< string, string >& /*rSettings*/ ) +bool save_crash_report( const string& rFileName, const boost::unordered_map< string, string >& /*rSettings*/ ) { bool bSuccess = false; FILE *fpout = fopen( rFileName.c_str(), "w" ); @@ -493,7 +493,7 @@ struct RequestParams }; -bool send_crash_report( const hash_map< string, string >& rSettings ) +bool send_crash_report( const boost::unordered_map< string, string >& rSettings ) { if ( 0 == strcasecmp( rSettings.find( "CONTACT" )->second.c_str(), "true" ) && !trim_string(rSettings.find( "EMAIL" )->second).length() ) @@ -557,7 +557,7 @@ static bool append_file( const char *filename, string& rString ) return true; } -string crash_get_details( const hash_map< string, string >& rSettings ) +string crash_get_details( const boost::unordered_map< string, string >& rSettings ) { string aRet; @@ -911,7 +911,7 @@ static bool write_crash_data() #if 0 // unused -static bool write_settings( const hash_map< string, string >& rSettings ) +static bool write_settings( const boost::unordered_map< string, string >& rSettings ) { bool success = false; string sRCFile = get_home_dir(); @@ -936,7 +936,7 @@ static bool write_settings( const hash_map< string, string >& rSettings ) } #endif -static void read_settings( hash_map< string, string >& rSettings ) +static void read_settings( boost::unordered_map< string, string >& rSettings ) { string sRCFile = get_home_dir(); @@ -952,7 +952,7 @@ static void read_settings( hash_map< string, string >& rSettings ) rSettings[ "TITLE" ] = ""; } -static void read_settings_from_environment( hash_map< string, string >& rSettings ) +static void read_settings_from_environment( boost::unordered_map< string, string >& rSettings ) { string strEnv; @@ -1071,7 +1071,7 @@ int main( int argc, char** argv ) if ( g_bSendReport ) { - hash_map< string, string > aDialogSettings; + boost::unordered_map< string, string > aDialogSettings; read_settings( aDialogSettings ); read_settings_from_environment( aDialogSettings ); @@ -1080,7 +1080,7 @@ int main( int argc, char** argv ) } else { - hash_map< string, string > aDialogSettings; + boost::unordered_map< string, string > aDialogSettings; read_settings( aDialogSettings ); read_settings_from_environment( aDialogSettings ); diff --git a/crashrep/source/win32/soreport.cpp b/crashrep/source/win32/soreport.cpp index 003055aeea47..4e8db7c20afd 100644 --- a/crashrep/source/win32/soreport.cpp +++ b/crashrep/source/win32/soreport.cpp @@ -70,7 +70,7 @@ #include <io.h> #include <fcntl.h> #include <string> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <winsock.h> #include <malloc.h> #include <process.h> @@ -1700,7 +1700,7 @@ static sal_uInt32 calc_md5_checksum( const char *filename, sal_uInt8 *pChecksum, #endif //*************************************************************************** -static bool WriteStackFile( FILE *fout, hash_map< string, string >& rLibraries, DWORD dwProcessId, PEXCEPTION_POINTERS pExceptionPointers ) +static bool WriteStackFile( FILE *fout, boost::unordered_map< string, string >& rLibraries, DWORD dwProcessId, PEXCEPTION_POINTERS pExceptionPointers ) { bool fSuccess = false; @@ -1823,7 +1823,7 @@ static bool WriteStackFile( FILE *fout, hash_map< string, string >& rLibraries, return fSuccess; } -bool WriteChecksumFile( FILE *fchksum, const hash_map< string, string >& rLibraries ) +bool WriteChecksumFile( FILE *fchksum, const boost::unordered_map< string, string >& rLibraries ) { bool success = false; @@ -1831,7 +1831,7 @@ bool WriteChecksumFile( FILE *fchksum, const hash_map< string, string >& rLibrar { fprintf( fchksum, "<errormail:Checksums type=\"MD5\">\n" ); - hash_map< string, string >::const_iterator iter; + boost::unordered_map< string, string >::const_iterator iter; for ( iter = rLibraries.begin(); iter != rLibraries.end(); @@ -2883,7 +2883,7 @@ int WINAPI _tWinMain( HINSTANCE hInstance, HINSTANCE, LPTSTR /*lpCmdLine*/, int if( bGotDumpFile ) { - hash_map< string, string > aLibraries; + boost::unordered_map< string, string > aLibraries; if ( g_bLoadReport ) { |