Skip to content

Commit

Permalink
0033544: Foundation Classes - Fixing compiler problems [HotFix]
Browse files Browse the repository at this point in the history
Fixed problem with Clang-16
Fixed problem with SWIG-4
Fixed genproj procedure
  • Loading branch information
dpasukhi committed Dec 6, 2023
1 parent 8147976 commit ffd7a3a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 36 deletions.
1 change: 1 addition & 0 deletions adm/UDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ n UnitsAPI
n gp
n math
r OS
n FlexLexer
t TKMath
t TKernel
n Adaptor2d
Expand Down
2 changes: 1 addition & 1 deletion src/Message/Message_AttributeMeter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
20 changes: 2 additions & 18 deletions src/NCollection/NCollection_Array1.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -150,7 +134,7 @@ public:
mySize(theUpper - theLower + 1),
myPointer(nullptr),
myIsOwner(false),
allocator_type(theAlloc)
myAllocator(theAlloc)
{
if (mySize == 0)
{
Expand Down
18 changes: 1 addition & 17 deletions src/NCollection/NCollection_DynamicArray.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
10 changes: 10 additions & 0 deletions src/NCollection/NCollection_Iterator.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down

0 comments on commit ffd7a3a

Please sign in to comment.