Skip to content

Commit

Permalink
talipot-core: Fix clang 17 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
anlambert committed Mar 18, 2024
1 parent bf026b2 commit e161049
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
13 changes: 12 additions & 1 deletion library/talipot-core/include/talipot/cxx/BmdList.cxx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
*
* Copyright (C) 2019-2022 The Talipot developers
* Copyright (C) 2019-2024 The Talipot developers
*
* Talipot is a fork of Tulip, created by David Auber
* and the Tulip development Team from LaBRI, University of Bordeaux
Expand All @@ -15,10 +15,21 @@
template <typename TYPE>
tlp::BmdList<TYPE>::BmdList() : head(nullptr), tail(nullptr), count(0) {}
//=================================================================

#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdtor-name"
#endif

template <typename TYPE>
tlp::BmdList<TYPE>::~BmdList() {
clear();
}

#ifdef __clang__
#pragma clang diagnostic pop
#endif

//=================================================================
template <typename TYPE>
tlp::BmdLink<TYPE> *tlp::BmdList<TYPE>::firstItem() {
Expand Down
11 changes: 11 additions & 0 deletions library/talipot-core/include/talipot/cxx/MutableContainer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ tlp::MutableContainer<TYPE, INDEX_TYPE>::MutableContainer()
(3.0 * double(sizeof(void *)) + double(sizeof(typename tlp::StoredType<TYPE>::Value)))),
compressing(false) {}
//===================================================================

#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdtor-name"
#endif

template <typename TYPE, typename INDEX_TYPE>
tlp::MutableContainer<TYPE, INDEX_TYPE>::~MutableContainer() {
switch (state) {
Expand Down Expand Up @@ -169,6 +175,11 @@ tlp::MutableContainer<TYPE, INDEX_TYPE>::~MutableContainer() {

StoredType<TYPE>::destroy(defaultValue);
}

#ifdef __clang__
#pragma clang diagnostic pop
#endif

//===================================================================
template <typename TYPE, typename INDEX_TYPE>
void tlp::MutableContainer<TYPE, INDEX_TYPE>::setDefault(
Expand Down

0 comments on commit e161049

Please sign in to comment.