(file) Return to AcceptLanguageList.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/AcceptLanguageList.cpp between version 1.2.2.2 and 1.3.16.2

version 1.2.2.2, 2006/02/10 16:20:23 version 1.3.16.2, 2007/09/12 20:35:20
Line 29 
Line 29 
 // //
 //============================================================================== //==============================================================================
 // //
 // Author: Humberto Rivero (hurivero@us.ibm.com)  
 //  
 // Modified By: Aruran, IBM (ashanmug@in.ibm.com) for Bug# 3514  
 //              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)  
 //  
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #include <Pegasus/Common/AcceptLanguageList.h> #include <Pegasus/Common/AcceptLanguageList.h>
Line 42 
Line 37 
 #include <Pegasus/Common/AutoPtr.h> #include <Pegasus/Common/AutoPtr.h>
 #include <Pegasus/Common/ArrayInternal.h> #include <Pegasus/Common/ArrayInternal.h>
  
   #if defined(PEGASUS_OS_VXWORKS)
   # include <math.h>
   #endif
   
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
 ////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
Line 159 
Line 158 
     _rep->qualityValues.clear();     _rep->qualityValues.clear();
 } }
  
   static inline bool _equal(Real32 x, Real32 y)
   {
   #if defined(PEGASUS_OS_VXWORKS)
   
       {
           float tmp = 1.5;
           assert(tmp == 1.5);
           printf("e1[%f]\n", tmp);
       }
   
       {
           float tmp = 1.0;
           assert(tmp == 1.0);
           printf("e2[%f]\n", tmp);
       }
   
       return fabs(double(x) - double(y)) < 0.00001;
   #else
       return x == y;
   #endif
   }
   
 Boolean AcceptLanguageList::operator==( Boolean AcceptLanguageList::operator==(
     const AcceptLanguageList& acceptLanguages) const     const AcceptLanguageList& acceptLanguages) const
 { {
Line 169 
Line 190 
  
     for (Uint32 i = 0; i < _rep->languageTags.size(); i++)     for (Uint32 i = 0; i < _rep->languageTags.size(); i++)
     {     {
         if ((_rep->languageTags[i] != acceptLanguages._rep->languageTags[i]) ||          if ((_rep->languageTags[i] != acceptLanguages._rep->languageTags[i]))
             (_rep->qualityValues[i] != acceptLanguages._rep->qualityValues[i]))              return false;
         {  
           Real32 x1 = _rep->qualityValues[i];
           Real32 x2 = acceptLanguages._rep->qualityValues[i];
   
           if (!_equal(x1, x2))
             return false;             return false;
         }  
     }     }
     return true;     return true;
 } }


Legend:
Removed from v.1.2.2.2  
changed lines
  Added in v.1.3.16.2

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2