Guest User

Patch for Qt issues with MSVC2011

a guest
Mar 4th, 2012
1,046
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ---
  2.  src/3rdparty/clucene/src/CLucene/debug/mem.h       |    4 ++--
  3.  src/3rdparty/clucene/src/CLucene/util/VoidList.h   |    9 ++++-----
  4.  src/3rdparty/clucene/src/CLucene/util/VoidMap.h    |    9 ++++-----
  5.  .../JavaScriptCore/runtime/Structure.cpp           |    8 ++++----
  6.  .../JavaScriptCore/runtime/Structure.h             |    2 +-
  7.  .../javascriptcore/JavaScriptCore/wtf/HashMap.h    |    2 +-
  8.  .../javascriptcore/JavaScriptCore/wtf/HashSet.h    |    4 ++--
  9.  .../JavaScriptCore/wtf/RefPtrHashMap.h             |    4 ++--
  10.  8 files changed, 20 insertions(+), 22 deletions(-)
  11.  
  12. diff --git a/src/3rdparty/clucene/src/CLucene/debug/mem.h b/src/3rdparty/clucene/src/CLucene/debug/mem.h
  13. index e15c3de..c208147 100644
  14. --- a/src/3rdparty/clucene/src/CLucene/debug/mem.h
  15. +++ b/src/3rdparty/clucene/src/CLucene/debug/mem.h
  16. @@ -16,10 +16,10 @@
  17.  //Macro for creating new objects
  18.  #if defined(LUCENE_ENABLE_MEMLEAKTRACKING)
  19.     #define _CLNEW new(__FILE__, __LINE__)
  20. -   #define LUCENE_BASE public CL_NS(debug)::LuceneBase
  21. +   #define LUCENE_BASE public virtual CL_NS(debug)::LuceneBase
  22.  #elif defined(LUCENE_ENABLE_REFCOUNT)
  23.     #define _CLNEW new
  24. -   #define LUCENE_BASE public CL_NS(debug)::LuceneBase
  25. +   #define LUCENE_BASE public virtual CL_NS(debug)::LuceneBase
  26.  #else
  27.     #define _CLNEW new
  28.     #define LUCENE_BASE public CL_NS(debug)::LuceneVoidBase
  29. diff --git a/src/3rdparty/clucene/src/CLucene/util/VoidList.h b/src/3rdparty/clucene/src/CLucene/util/VoidList.h
  30. index cd69088..b31baba 100644
  31. --- a/src/3rdparty/clucene/src/CLucene/util/VoidList.h
  32. +++ b/src/3rdparty/clucene/src/CLucene/util/VoidList.h
  33. @@ -19,16 +19,15 @@ CL_NS_DEF(util)
  34.  * A template to encapsulate various list type classes
  35.  * @internal
  36.  */
  37. -template<typename _kt,typename _base,typename _valueDeletor>
  38. -class __CLList:public _base,LUCENE_BASE {
  39. +template<typename _kt,typename base,typename _valueDeletor>
  40. +class __CLList:public base,LUCENE_BASE {
  41.  private:
  42.     bool dv;
  43. -   typedef _base base;
  44.  public:
  45.      DEFINE_MUTEX(THIS_LOCK)
  46.  
  47. -   typedef typename _base::const_iterator const_iterator;
  48. -   typedef typename _base::iterator iterator;
  49. +   typedef typename base::const_iterator const_iterator;
  50. +   typedef typename base::iterator iterator;
  51.  
  52.     virtual ~__CLList(){
  53.         clear();
  54. diff --git a/src/3rdparty/clucene/src/CLucene/util/VoidMap.h b/src/3rdparty/clucene/src/CLucene/util/VoidMap.h
  55. index b22b507..1153a01 100644
  56. --- a/src/3rdparty/clucene/src/CLucene/util/VoidMap.h
  57. +++ b/src/3rdparty/clucene/src/CLucene/util/VoidMap.h
  58. @@ -19,19 +19,18 @@ CL_NS_DEF(util)
  59.  * @internal
  60.  */
  61.  template<typename _kt, typename _vt,
  62. -   typename _base,
  63. +   typename base,
  64.     typename _KeyDeletor=CL_NS(util)::Deletor::Dummy,
  65.     typename _ValueDeletor=CL_NS(util)::Deletor::Dummy>
  66. -class __CLMap:public _base,LUCENE_BASE {
  67. +class __CLMap: public base, LUCENE_BASE {
  68.  private:
  69.     bool dk;
  70.     bool dv;
  71. -   typedef _base base;
  72.  public:
  73.     DEFINE_MUTEX(THIS_LOCK)
  74.  
  75. -   typedef typename _base::iterator iterator;
  76. -   typedef typename _base::const_iterator const_iterator;
  77. +   typedef typename base::iterator iterator;
  78. +   typedef typename base::const_iterator const_iterator;
  79.     typedef CL_NS_STD(pair)<_kt, _vt> _pair;
  80.  
  81.     ///Default constructor for the __CLMap
  82. diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.cpp
  83. index 8e50dd1..499c53a 100644
  84. --- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.cpp
  85. +++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.cpp
  86. @@ -157,7 +157,7 @@ Structure::~Structure()
  87.  {
  88.      if (m_previous) {
  89.          if (m_nameInPrevious)
  90. -            m_previous->table.remove(make_pair(RefPtr<UString::Rep>(m_nameInPrevious.get()), m_attributesInPrevious), m_specificValueInPrevious);
  91. +            m_previous->table.remove(StructureTransitionTableHash::Key(RefPtr<UString::Rep>(m_nameInPrevious.get()), m_attributesInPrevious), m_specificValueInPrevious);
  92.          else
  93.              m_previous->table.removeAnonymousSlotTransition(m_anonymousSlotsInPrevious);
  94.  
  95. @@ -344,7 +344,7 @@ PassRefPtr<Structure> Structure::addPropertyTransitionToExistingStructure(Struct
  96.      ASSERT(!structure->isDictionary());
  97.      ASSERT(structure->typeInfo().type() == ObjectType);
  98.  
  99. -    if (Structure* existingTransition = structure->table.get(make_pair(RefPtr<UString::Rep>(propertyName.ustring().rep()), attributes), specificValue)) {
  100. +    if (Structure* existingTransition = structure->table.get(StructureTransitionTableHash::Key(RefPtr<UString::Rep>(propertyName.ustring().rep()), attributes), specificValue)) {
  101.          ASSERT(existingTransition->m_offset != noOffset);
  102.          offset = existingTransition->m_offset;
  103.          return existingTransition;
  104. @@ -403,7 +403,7 @@ PassRefPtr<Structure> Structure::addPropertyTransition(Structure* structure, con
  105.  
  106.      transition->m_offset = offset;
  107.  
  108. -    structure->table.add(make_pair(RefPtr<UString::Rep>(propertyName.ustring().rep()), attributes), transition.get(), specificValue);
  109. +    structure->table.add(StructureTransitionTableHash::Key(RefPtr<UString::Rep>(propertyName.ustring().rep()), attributes), transition.get(), specificValue);
  110.      return transition.release();
  111.  }
  112.  
  113. @@ -888,7 +888,7 @@ void Structure::addAnonymousSlots(unsigned count)
  114.  
  115.  bool Structure::hasTransition(UString::Rep* rep, unsigned attributes)
  116.  {
  117. -    return table.hasTransition(make_pair(RefPtr<UString::Rep>(rep), attributes));
  118. +    return table.hasTransition(StructureTransitionTableHash::Key(RefPtr<UString::Rep>(rep), attributes));
  119.  }
  120.  
  121.  size_t Structure::remove(const Identifier& propertyName)
  122. diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h
  123. index 5284258..7571efc 100644
  124. --- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h
  125. +++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h
  126. @@ -317,7 +317,7 @@ namespace JSC {
  127.          TransitionTable* transitionTable = new TransitionTable;
  128.          setTransitionTable(transitionTable);
  129.          if (existingTransition)
  130. -            add(std::make_pair(RefPtr<UString::Rep>(existingTransition->m_nameInPrevious.get()), existingTransition->m_attributesInPrevious), existingTransition, existingTransition->m_specificValueInPrevious);
  131. +            add(StructureTransitionTableHash::Key(RefPtr<UString::Rep>(existingTransition->m_nameInPrevious.get()), existingTransition->m_attributesInPrevious), existingTransition, existingTransition->m_specificValueInPrevious);
  132.      }
  133.  } // namespace JSC
  134.  
  135. diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashMap.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashMap.h
  136. index de4743a..a93b07e 100644
  137. --- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashMap.h
  138. +++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashMap.h
  139. @@ -237,7 +237,7 @@ namespace WTF {
  140.          typedef HashMapTranslator<ValueType, ValueTraits, HashFunctions> TranslatorType;
  141.          pair<typename HashTableType::iterator, bool> p = m_impl.template add<KeyType, MappedType, TranslatorType>(key, mapped);
  142.     typename HashMap<T, U, V, W, X>::iterator temp = p.first;
  143. -        return make_pair<typename HashMap<T, U, V, W, X>::iterator, bool>(temp, p.second);
  144. +        return std::pair<typename HashMap<T, U, V, W, X>::iterator, bool>(temp, p.second);
  145.  //      return m_impl.template add<KeyType, MappedType, TranslatorType>(key, mapped);
  146.      }
  147.  
  148. diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashSet.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashSet.h
  149. index e56e384..0b5d838 100644
  150. --- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashSet.h
  151. +++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashSet.h
  152. @@ -209,7 +209,7 @@ namespace WTF {
  153.      {
  154.          pair<typename HashTable<T, T, IdentityExtractor<T>, U, V, V>::iterator, bool> p = m_impl.add(value);
  155.          typename HashSet<T, U, V>::iterator temp = p.first;
  156. -        pair<typename HashSet<T, U, V>::iterator, bool> p2 = make_pair<typename HashSet<T, U, V>::iterator, bool>(temp, p.second);
  157. +        pair<typename HashSet<T, U, V>::iterator, bool> p2 = pair<typename HashSet<T, U, V>::iterator, bool>(temp, p.second);
  158.   //       p2.first = p.first;
  159.   //       p2.second = p.second;
  160.          return p2;
  161. @@ -222,7 +222,7 @@ namespace WTF {
  162.      {
  163.          typedef HashSetTranslatorAdapter<ValueType, ValueTraits, T, HashTranslator> Adapter;
  164.          pair<typename HashTableType::iterator, bool> p = m_impl.template addPassingHashCode<T, T, Adapter>(value, value);
  165. -   return make_pair<iterator, bool>(p.first, p.second);
  166. +   return pair<iterator, bool>(p.first, p.second);
  167.      }
  168.  
  169.      template<typename T, typename U, typename V>
  170. diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/RefPtrHashMap.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/RefPtrHashMap.h
  171. index 14684e8..38a17d8 100644
  172. --- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/RefPtrHashMap.h
  173. +++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/RefPtrHashMap.h
  174. @@ -212,7 +212,7 @@ namespace WTF {
  175.          typedef HashMapTranslator<ValueType, ValueTraits, HashFunctions> TranslatorType;
  176.          pair<typename HashTableType::iterator, bool> p = m_impl.template add<KeyType, MappedType, TranslatorType>(key, mapped);
  177.  //        typename RefPtrHashMap<T, U, V, W, X>::iterator temp = p.first;
  178. -        return make_pair<typename RefPtrHashMap<T, U, V, W, X>::iterator, bool>(
  179. +        return std::pair<typename RefPtrHashMap<T, U, V, W, X>::iterator, bool>(
  180.              typename RefPtrHashMap<T, U, V, W, X>::iterator(p.first), p.second);
  181.  
  182.  //        return m_impl.template add<KeyType, MappedType, TranslatorType>(key, mapped);
  183. @@ -223,7 +223,7 @@ namespace WTF {
  184.      RefPtrHashMap<T, U, V, W, X>::inlineAdd(RawKeyType key, const MappedType& mapped)
  185.      {
  186.          pair<typename HashTableType::iterator, bool> p = m_impl.template add<RawKeyType, MappedType, RawKeyTranslator>(key, mapped);
  187. -        return make_pair<typename RefPtrHashMap<T, U, V, W, X>::iterator, bool>(
  188. +        return std::pair<typename RefPtrHashMap<T, U, V, W, X>::iterator, bool>(
  189.              typename RefPtrHashMap<T, U, V, W, X>::iterator(p.first), p.second);
  190.  
  191.   //       return m_impl.template add<RawKeyType, MappedType, RawKeyTranslator>(key, mapped);
  192. --
RAW Paste Data