From 7a09fcc4cd90dce827992bd41ed54f8096f08205 Mon Sep 17 00:00:00 2001 From: "beard%netscape.com" Date: Tue, 9 May 2000 05:55:30 +0000 Subject: [PATCH] map::find() works just fine on all platforms. --- js/js2/jstypes.h | 8 -------- js2/src/jstypes.h | 8 -------- 2 files changed, 16 deletions(-) diff --git a/js/js2/jstypes.h b/js/js2/jstypes.h index 33c449c73106..32bf21582a2d 100644 --- a/js/js2/jstypes.h +++ b/js/js2/jstypes.h @@ -156,17 +156,9 @@ namespace JSTypes { const JSValue& getProperty(const String& name) { - #ifdef XP_MAC JSProperties::const_iterator i = mProperties.find(name); if (i != mProperties.end()) return i->second; - #else - // XXX should use map.find() to do this efficiently, but - // unfortunately, find() returns an iterator that is different - // on different STL implementations. - if (mProperties.count(name)) - return mProperties[name]; - #endif if (mPrototype) return mPrototype->getProperty(name); return kUndefinedValue; diff --git a/js2/src/jstypes.h b/js2/src/jstypes.h index 33c449c73106..32bf21582a2d 100644 --- a/js2/src/jstypes.h +++ b/js2/src/jstypes.h @@ -156,17 +156,9 @@ namespace JSTypes { const JSValue& getProperty(const String& name) { - #ifdef XP_MAC JSProperties::const_iterator i = mProperties.find(name); if (i != mProperties.end()) return i->second; - #else - // XXX should use map.find() to do this efficiently, but - // unfortunately, find() returns an iterator that is different - // on different STL implementations. - if (mProperties.count(name)) - return mProperties[name]; - #endif if (mPrototype) return mPrototype->getProperty(name); return kUndefinedValue;