mail[Wesnoth-commits] r28300 - /trunk/src/addon_management.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by paniemin on August 02, 2008 - 12:19:
Author: suokko
Date: Sat Aug  2 12:19:05 2008
New Revision: 28300

URL: http://svn.gna.org/viewcvs/wesnoth?rev=28300&view=rev
Log:
std::map doesn't include at in gcc 3.3 so changed code to use find instead

Modified:
    trunk/src/addon_management.cpp

Modified: trunk/src/addon_management.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/addon_management.cpp?rev=28300&r1=28299&r2=28300&view=diff
==============================================================================
--- trunk/src/addon_management.cpp (original)
+++ trunk/src/addon_management.cpp Sat Aug  2 12:19:05 2008
@@ -1174,12 +1174,14 @@
        }
 }
 
-const addon_version_info& get_addon_version_info(const std::string& addon)
+const addon_version_info& get_addon_version_info(const std::String& addon)
 {
        static const addon_version_info nil(0,0,0,false);
-       try {
-               const addon_version_info& ret = version_info_cache.at(addon);
-               return ret;
-       } catch(std::out_of_range const&) { ; }
-       return nil;
-}
+       std::map< std::String, addon_version_info >::iterator ret = 
version_info_cache.find(addon);
+
+       if (ret != version_info_cache.end())
+               return ret->second;
+       else
+               return nil;
+
+}




Related Messages


Powered by MHonArc, Updated Sat Aug 02 13:01:02 2008