]> OCCT Git - occt.git/commitdiff
0033544: Foundation Classes - Fixing compiler problems [HotFix]
authordpasukhi <dpasukhi@opencascade.com>
Wed, 6 Dec 2023 10:42:54 +0000 (10:42 +0000)
committerdpasukhi <dpasukhi@opencascade.com>
Wed, 6 Dec 2023 13:00:13 +0000 (13:00 +0000)
Fixed problem with Clang-16
Fixed problem with SWIG-4
Fixed genproj procedure

adm/UDLIST
src/Message/Message_AttributeMeter.cxx
src/NCollection/NCollection_Array1.hxx
src/NCollection/NCollection_DynamicArray.hxx
src/NCollection/NCollection_Iterator.hxx

index 14f425239d2e9b7e85f1f69042ce0493bd0abb9b..9441779af111d94737ab72032dbc5b745e1ce3ad 100644 (file)
@@ -32,6 +32,7 @@ n UnitsAPI
 n gp
 n math
 r OS
+n FlexLexer
 t TKMath
 t TKernel
 n Adaptor2d
index d6be5057ef92bb95f910d4d2d8d026c0e5d70b6c..e50976c91043c81bd548dca804df5d6ba8117ef3 100644 (file)
@@ -253,6 +253,6 @@ void Message_AttributeMeter::DumpJson (Standard_OStream& theOStream,
        anIterator.More(); anIterator.Next())
   {
     OCCT_DUMP_VECTOR_CLASS (theOStream, Message::MetricToString (anIterator.Key()),
-                            2, anIterator.Value(), anIterator.Value())
+                            2, anIterator.Value().first, anIterator.Value().second)
   }
 }
index 4dcabc29f5cf8a38566d5d763067a3d40619e3c6..a52b6cc908cccd63a0a0d191166a5dc0f48ec888 100644 (file)
@@ -72,26 +72,10 @@ public:
 
   using iterator = NCollection_IndexedIterator<std::random_access_iterator_tag, NCollection_Array1, value_type, false>;
   using const_iterator = NCollection_IndexedIterator<std::random_access_iterator_tag, NCollection_Array1, value_type, true>;
+  using Iterator = NCollection_Iterator<NCollection_Array1<TheItemType>>;
 
 public:
 
-  // Iterator class
-  class Iterator : public NCollection_Iterator<NCollection_Array1>
-  {
-  public:
-    using NCollection_Iterator<NCollection_Array1>::NCollection_Iterator;
-
-    const_reference Value() const
-    {
-      return *NCollection_Iterator<NCollection_Array1>::ValueIter();
-    }
-
-    reference ChangeValue()
-    {
-      return *NCollection_Iterator<NCollection_Array1>::ChangeValueIter();
-    }
-  };
-
   const_iterator begin() const
   {
     return const_iterator(*this);
@@ -150,7 +134,7 @@ public:
     mySize(theUpper - theLower + 1),
     myPointer(nullptr),
     myIsOwner(false),
-    allocator_type(theAlloc)
+    myAllocator(theAlloc)
   {
     if (mySize == 0)
     {
index 5c7ebc655b6305473413a98f9d34154869c7d4f3..ac93f529086ea5475c1705a786052dc24dedde1f 100644 (file)
@@ -77,26 +77,10 @@ public:
 
   using iterator = NCollection_IndexedIterator<std::random_access_iterator_tag, NCollection_DynamicArray, value_type, false>;
   using const_iterator = NCollection_IndexedIterator<std::random_access_iterator_tag, NCollection_DynamicArray, value_type, true>;
+  using Iterator = NCollection_Iterator<NCollection_DynamicArray<TheItemType>>;
 
 public:
 
-  // Iterator class
-  class Iterator : public NCollection_Iterator<NCollection_DynamicArray>
-  {
-  public:
-    using NCollection_Iterator<NCollection_DynamicArray>::NCollection_Iterator;
-
-    const_reference Value() const
-    {
-      return *NCollection_Iterator<NCollection_DynamicArray>::ValueIter();
-    }
-
-    reference ChangeValue()
-    {
-      return *NCollection_Iterator<NCollection_DynamicArray>::ChangeValueIter();
-    }
-  };
-
   const_iterator begin() const
   {
     return const_iterator(*this);
index ec4481ae40d3accf0a2324a53c13c17b6cfba615..268adf2f9168d7cdaf75513d12a4d9d6dc59f295 100644 (file)
@@ -94,6 +94,16 @@ public:
     ++(myCur);
   }
 
+  const typename Container::const_reference Value() const
+  {
+    return *myCur;
+  }
+
+  const typename Container::reference ChangeValue()
+  {
+    return *myCur;
+  }
+
   bool operator==(const NCollection_Iterator& theOther) { return myLast == theOther.myLast && myCur == theOther.myCur; }
 
   bool operator!=(const NCollection_Iterator& theOther) { return myLast != theOther.myLast || myCur != theOther.myCur; }