Skip to content

Commit

Permalink
remove unused members requiring nonexistent EqualKeyTo
Browse files Browse the repository at this point in the history
  • Loading branch information
matekelemen committed Oct 20, 2024
1 parent d476ee0 commit f48bc4b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 28 deletions.
15 changes: 0 additions & 15 deletions kratos/containers/global_pointers_vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,21 +199,6 @@ class GlobalPointersVector final
return mData[i];
}

/**
* @brief Equality comparison operator to check if two GlobalPointersVector objects are equal.
* @details This function checks if the sizes are equal and then compares the elements for equality
* using the EqualKeyTo() function.
* @param r The GlobalPointersVector to compare with.
* @return True if the containers are equal, false otherwise.
*/
bool operator==(const GlobalPointersVector& r) const // nothrow
{
if (size() != r.size())
return false;
else
return std::equal(mData.begin(), mData.end(), r.mData.begin(), this->EqualKeyTo());
}

///@}
///@name Operations
///@{
Expand Down
18 changes: 5 additions & 13 deletions kratos/containers/pointer_vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
// Multi-Physics
//
// License: BSD License
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Pooyan Dadvand
// Riccardo Rossi
//
//
//


Expand Down Expand Up @@ -154,14 +154,6 @@ class PointerVector final
return mData[i];
}

bool operator==( const PointerVector& r ) const // nothrow
{
if( size() != r.size() )
return false;
else
return std::equal(mData.begin(), mData.end(), r.mData.begin(), this->EqualKeyTo());
}

///@}
///@name Operations
///@{
Expand Down Expand Up @@ -278,7 +270,7 @@ class PointerVector final
}

template<class... Args>
void emplace_back(Args&&... args)
void emplace_back(Args&&... args)
{
mData.emplace_back(std::forward<Args>(args)...);
}
Expand Down Expand Up @@ -520,4 +512,4 @@ inline std::ostream& operator << (std::ostream& rOStream,

} // namespace Kratos.

#endif // KRATOS_POINTER_VECTOR_SET_H_INCLUDED defined
#endif // KRATOS_POINTER_VECTOR_SET_H_INCLUDED defined

0 comments on commit f48bc4b

Please sign in to comment.