On Sat, 20 Aug 2011 20:38:21 +0200 (CEST), zooey@xxxxxxxxxxxxxxx wrote:
Author: zooey Date: 2011-08-20 20:38:20 +0200 (Sat, 20 Aug 2011) New Revision: 42649 Changeset: https://dev.haiku-os.org/changeset/42649 Modified: haiku/trunk/data/catalogs/preferences/time/de.catkeys haiku/trunk/src/preferences/time/ZoneView.cpp Log: Translate all regions in Time prefs
Modified: haiku/trunk/src/preferences/time/ZoneView.cpp =================================================================== --- haiku/trunk/src/preferences/time/ZoneView.cpp 2011-08-20 17:46:50 UTC (rev 42648) +++ haiku/trunk/src/preferences/time/ZoneView.cpp 2011-08-20 18:38:20 UTC (rev 42649) @@ -324,22 +340,18 @@ continue; }- // just accept timezones from "proper" regions, others are aliases- ZoneItemMap::iterator regionIter = zoneMap.find(region); - if (regionIter == zoneMap.end()) + // just accept timezones from our supported regions, others are + // aliases and would just make the list even longer+ TranslatedRegionMap::iterator regionIter = regionMap.find(region);+ if (regionIter == zoneItemMap.end()) continue;
gcc4 build breaks here with following error message:/Sources/haiku/trunk/src/preferences/time/ZoneView.cpp: In member function 'void TimeZoneView::_BuildZoneMenu()': /Sources/haiku/trunk/src/preferences/time/ZoneView.cpp:346:38: error: no match for 'operator==' in 'regionIter == zoneItemMap.std::map<_Key, _Tp, _Compare, _Alloc>::end [with _Key = BString, _Tp = TimeZoneListItem*, _Compare = TimeZoneItemLess, _Alloc = std::allocator<std::pair<const BString, TimeZoneListItem*> >, std::map<_Key, _Tp, _Compare, _Alloc>::iterator = std::_Rb_tree_iterator<std::pair<const BString, TimeZoneListItem*> >]()' /boot/develop/abi/x86/gcc4/tools/gcc-4.5.3-haiku-110620/lib/gcc/i586-pc-haiku/4.5.3/../../../../include/c++/4.5.3/bits/stl_tree.h:212:7: note: candidates are: bool std::_Rb_tree_iterator<_Tp>::operator==(const std::_Rb_tree_iterator<_Tp>::_Self&) const [with _Tp = std::pair<const BString, BString>, std::_Rb_tree_iterator<_Tp>::_Self = std::_Rb_tree_iterator<std::pair<const BString, BString> >] /Sources/haiku/trunk/headers/os/interface/GraphicsDefs.h:21:1: note: bool operator==(const pattern&, const pattern&) /Sources/haiku/trunk/headers/os/support/String.h:536:1: note: bool operator==(const char*, const BString&) /Sources/haiku/trunk/generated.gcc4/build_packages/icu-devel-4.8.1-2011-08-18/develop/headers/3rdparty/unicode/stringpiece.h:209:1: note: UBool icu::operator==(const icu::StringPiece&, const icu::StringPiece&) LinkApplicationCatalog1 /Sources/haiku/trunk/generated.gcc4/objects/catalogs/preferences/cpufrequency/ko.catalog AppendToContainerCopyFilesScript <HaikuImage>haiku.image-copy-files-dummy-system/add-ons/kernel/busses/agp_gart LinkApplicationCatalog1 /Sources/haiku/trunk/generated.gcc4/objects/catalogs/preferences/cpufrequency/lt.catalog AddTargetVariableToScript1 /Sources/haiku/trunk/generated.gcc4/haiku.image-init-vars
regionMap and zoneItemMap are maps different types - so this comparison looks really suspicious.
Was the: if (regionIter == regionMap.end()) assumed here? -- Kind Regards, S.Zharski