diff --git a/.clang-format b/.clang-format index c0ea271b50f58797acf081881135d0f42d5a5def..d57a23ea092d3ab6c524a99bc2fafab7d6cdb5bc 100644 --- a/.clang-format +++ b/.clang-format @@ -1,13 +1,31 @@ --- -# This configuration requires clang-format 9.0 or higher. +# This configuration requires clang-format 16 or higher. BasedOnStyle: Mozilla AlignAfterOpenBracket: AlwaysBreak AlignOperands: false AlwaysBreakAfterReturnType: None AlwaysBreakAfterDefinitionReturnType: None -BreakBeforeBraces: Allman +BreakBeforeBraces: Custom +BraceWrapping: + AfterCaseLabel: true + AfterClass: true + AfterControlStatement: Always + AfterEnum: true + AfterFunction: true + AfterNamespace: true + AfterStruct: true + AfterUnion: true + AfterExternBlock: true + BeforeCatch: true + BeforeElse: true + BeforeLambdaBody: false + BeforeWhile: false + IndentBraces: false + SplitEmptyFunction: true + SplitEmptyRecord: true + SplitEmptyNamespace: true ColumnLimit: 100 -Standard: Cpp11 +Standard: c++17 FixNamespaceComments: true ReflowComments: false ... diff --git a/.clang-tidy b/.clang-tidy index e82b4e4bb8788b49fc85f3689b7e14882a539da6..4097eb3df19f7b317b8b40025b87bac8df289bb0 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -62,10 +62,13 @@ misc-*,\ -misc-use-anonymous-namespace,\ -misc-use-internal-linkage,\ modernize-*,\ +-modernize-avoid-bind,\ -modernize-avoid-c-arrays,\ +-modernize-concat-nested-namespaces,\ -modernize-loop-convert,\ -modernize-macro-to-enum,\ -modernize-make-shared,\ +-modernize-make-unique,\ -modernize-pass-by-value,\ -modernize-raw-string-literal,\ -modernize-return-braced-init-list,\ @@ -75,6 +78,7 @@ modernize-*,\ -modernize-use-emplace,\ -modernize-use-equals-default,\ -modernize-use-equals-delete,\ +-modernize-use-nodiscard,\ -modernize-use-noexcept,\ -modernize-use-nullptr,\ -modernize-use-override,\ @@ -122,6 +126,7 @@ readability-*,\ -readability-redundant-access-specifiers,\ -readability-redundant-casting,\ -readability-redundant-control-flow,\ +-readability-redundant-declaration,\ -readability-redundant-inline-specifier,\ -readability-redundant-member-init,\ -readability-redundant-smartptr-get,\ diff --git a/.gitattributes b/.gitattributes index 3d96311aedf3915891d7fb6cdb1d8c7f8397ccf9..4c6668282a65d8f2e100ce440c1868e62e962b6a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,5 @@ # Attributes used for formatting. -[attr]our-c-style whitespace=tab-in-indent format.clang-format=9 +[attr]our-c-style whitespace=tab-in-indent format.clang-format=16 [attr]our-py-style whitespace=tab-in-indent format.autopep8 [attr]our-rst-style conflict-marker-size=100 # Attributes for binary and/or large files @@ -12,7 +12,7 @@ *.py our-py-style *.rst our-rst-style -*.otf lfs +*.otf lfs thirdparty/** -format.clang-format -format.autopep8 **/pybind11/* -format.clang-format diff --git a/CMakeLists.txt b/CMakeLists.txt index 898e5db5973ce44fc747da115a6cfa6f21f5815e..690be8b37fb148ba2ef6c38fb3e321e9299ce342 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,9 @@ cmake_minimum_required(VERSION 3.20) #If the user/superbuild hasn't explicitly stated what c++ standard to use -#require C++11 +#require C++17 if(NOT DEFINED CMAKE_CXX_STANDARD) - set(CMAKE_CXX_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED True) set(CMAKE_CXX_EXTENSIONS FALSE) endif() diff --git a/smtk/AutoInit.h b/smtk/AutoInit.h index bfa3c2675c34a8f7a7196f321ee241d7ea901b98..a13b4bf110bf0e8f3b55cdd16755f68d4a2f5728 100644 --- a/smtk/AutoInit.h +++ b/smtk/AutoInit.h @@ -47,9 +47,15 @@ smtkAutoInitComponentMacro(C) static struct C##_ComponentInit \ { \ /* Call _AutoInit_Construct during initialization. */ \ - C##_ComponentInit() { smtkAutoInitConstructMacro(C) } \ + C##_ComponentInit() \ + { \ + smtkAutoInitConstructMacro(C) \ + } \ /* Call _AutoInit_Destruct during finalization. */ \ - ~C##_ComponentInit() { smtkAutoInitDestructMacro(C) } \ + ~C##_ComponentInit() \ + { \ + smtkAutoInitDestructMacro(C) \ + } \ } C##_ComponentInit_Instance; #endif // smtk_AutoInit_h diff --git a/smtk/SharedFromThis.h b/smtk/SharedFromThis.h index 62e2a2271b0afee297899ffd480930ef391ac786..84ec3a1c2bddc298007f5609c6a417a5c7b9d20e 100644 --- a/smtk/SharedFromThis.h +++ b/smtk/SharedFromThis.h @@ -30,7 +30,10 @@ /// Used by smtkTypeMacro and smtkTypeMacroBase to provide access to the inheritance hierarchy. #define smtkInheritanceHierarchyBase(...) \ - virtual smtk::string::Token typeToken() const { return smtk::string::Token(type_name); } \ + virtual smtk::string::Token typeToken() const \ + { \ + return smtk::string::Token(type_name); \ + } \ virtual std::vector classHierarchy() const \ { \ static std::vector baseTypes; \ @@ -68,7 +71,10 @@ } #define smtkInheritanceHierarchy(...) \ - smtk::string::Token typeToken() const override { return smtk::string::Token(type_name); } \ + smtk::string::Token typeToken() const override \ + { \ + return smtk::string::Token(type_name); \ + } \ std::vector classHierarchy() const override \ { \ static std::vector baseTypes; \ @@ -101,11 +107,17 @@ */ #define smtkTypenameMacroBase(...) \ static constexpr const char* const type_name = #__VA_ARGS__; \ - virtual std::string typeName() const { return type_name; } \ + virtual std::string typeName() const \ + { \ + return type_name; \ + } \ smtkInheritanceHierarchyBase(__VA_ARGS__); #define smtkTypenameMacro(...) \ static constexpr const char* const type_name = #__VA_ARGS__; \ - std::string typeName() const override { return type_name; } \ + std::string typeName() const override \ + { \ + return type_name; \ + } \ smtkInheritanceHierarchy(__VA_ARGS__); ///@} diff --git a/smtk/SystemConfig.h b/smtk/SystemConfig.h index 89f6733c3b210da69d2c1ab2d4950b2799605507..77e9168231fa3b7d0a658e52d801de7b7eb340fe 100644 --- a/smtk/SystemConfig.h +++ b/smtk/SystemConfig.h @@ -25,10 +25,16 @@ #endif //Windows specific stuff #define SMTK_BASE_TYPE(thisclass) \ - virtual const char* classname() const { return #thisclass; } + virtual const char* classname() const \ + { \ + return #thisclass; \ + } #define SMTK_DERIVED_TYPE(thisclass, superclass) \ typedef superclass Superclass; \ - const char* classname() const override { return #thisclass; } + const char* classname() const override \ + { \ + return #thisclass; \ + } #endif //__smtk_SystemConfig_h diff --git a/smtk/common/WeakReferenceWrapper.h b/smtk/common/WeakReferenceWrapper.h index 1d656da210921b50c3020a23b5f8cd7931b2b457..20b01755712fa7536eba542df9a69aeaf83d81a7 100644 --- a/smtk/common/WeakReferenceWrapper.h +++ b/smtk/common/WeakReferenceWrapper.h @@ -125,7 +125,8 @@ public: this->get(); } // Use this union to avoid strict-aliasing warnings about type-punned pointers: - union { + union + { Type* const* cache_ptr; const size_t* hash_ptr; } data; diff --git a/smtk/extension/paraview/appcomponents/pqSMTKAppComponentsAutoStart.cxx b/smtk/extension/paraview/appcomponents/pqSMTKAppComponentsAutoStart.cxx index c5e1b6da04fe67c7f934e852db3847745bc6dd0c..8c8275e1c9ac1ca8121ef253f1e4bab3ccdd80f5 100644 --- a/smtk/extension/paraview/appcomponents/pqSMTKAppComponentsAutoStart.cxx +++ b/smtk/extension/paraview/appcomponents/pqSMTKAppComponentsAutoStart.cxx @@ -186,7 +186,7 @@ void pqSMTKAppComponentsAutoStart::observeWrapper(pqSMTKWrapper* wrapper, pqServ [this]( const smtk::operation::Operation& op, smtk::operation::EventType event, - smtk::operation::Operation::Result const & + smtk::operation::Operation::Result const& /*result*/) -> int { (void)op; if (event == smtk::operation::EventType::WILL_OPERATE) diff --git a/smtk/extension/paraview/appcomponents/pqSMTKCallObserversOnMainThreadBehavior.cxx b/smtk/extension/paraview/appcomponents/pqSMTKCallObserversOnMainThreadBehavior.cxx index 7dd04231558b5eda0a1164b3deb03fef6cc1a4c5..908fc96d376e701b2e9ac70128ed8324ec42fb7b 100644 --- a/smtk/extension/paraview/appcomponents/pqSMTKCallObserversOnMainThreadBehavior.cxx +++ b/smtk/extension/paraview/appcomponents/pqSMTKCallObserversOnMainThreadBehavior.cxx @@ -30,7 +30,7 @@ pqSMTKCallObserversOnMainThreadBehavior::pqSMTKCallObserversOnMainThreadBehavior // thread. QObject::connect( pqSMTKBehavior::instance(), - (void (pqSMTKBehavior::*)(pqSMTKWrapper*, pqServer*)) & pqSMTKBehavior::addedManagerOnServer, + (void(pqSMTKBehavior::*)(pqSMTKWrapper*, pqServer*)) & pqSMTKBehavior::addedManagerOnServer, this, &pqSMTKCallObserversOnMainThreadBehavior::forceObserversToBeCalledOnMainThread); } @@ -87,7 +87,7 @@ void pqSMTKCallObserversOnMainThreadBehavior::forceObserversToBeCalledOnMainThre std::weak_ptr resourceManager = wrapper->smtkResourceManager(); QObject::connect( this, - (void (pqSMTKCallObserversOnMainThreadBehavior::*)(QString, int, QPrivateSignal)) & + (void(pqSMTKCallObserversOnMainThreadBehavior::*)(QString, int, QPrivateSignal)) & pqSMTKCallObserversOnMainThreadBehavior::resourceEvent, this, [this, resourceManager](QString resourceId, int event) { @@ -135,7 +135,7 @@ void pqSMTKCallObserversOnMainThreadBehavior::forceObserversToBeCalledOnMainThre // functors. QObject::connect( this, - (void (pqSMTKCallObserversOnMainThreadBehavior::*)(QString, int, QString, QPrivateSignal)) & + (void(pqSMTKCallObserversOnMainThreadBehavior::*)(QString, int, QString, QPrivateSignal)) & pqSMTKCallObserversOnMainThreadBehavior::operationEvent, this, [this](QString operationId, int event, QString resultName) { @@ -171,7 +171,7 @@ void pqSMTKCallObserversOnMainThreadBehavior::forceObserversToBeCalledOnMainThre // functors. QObject::connect( this, - (void (pqSMTKCallObserversOnMainThreadBehavior::*)(QString, QString, QPrivateSignal)) & + (void(pqSMTKCallObserversOnMainThreadBehavior::*)(QString, QString, QPrivateSignal)) & pqSMTKCallObserversOnMainThreadBehavior::selectionEvent, this, [this](QString selectionId, QString qstr) { diff --git a/smtk/extension/paraview/appcomponents/pqSMTKCloseWithActiveOperationBehavior.cxx b/smtk/extension/paraview/appcomponents/pqSMTKCloseWithActiveOperationBehavior.cxx index cb144a21295cec4fcf60a7a6f4ba5471968a24bf..62c79ec8b4e0b1b8fe85d3b94d1e345e337fb57e 100644 --- a/smtk/extension/paraview/appcomponents/pqSMTKCloseWithActiveOperationBehavior.cxx +++ b/smtk/extension/paraview/appcomponents/pqSMTKCloseWithActiveOperationBehavior.cxx @@ -54,7 +54,7 @@ pqSMTKCloseWithActiveOperationBehavior::pqSMTKCloseWithActiveOperationBehavior(Q // tracks the number of active operations. QObject::connect( pqSMTKBehavior::instance(), - (void (pqSMTKBehavior::*)(pqSMTKWrapper*, pqServer*)) & pqSMTKBehavior::addedManagerOnServer, + (void(pqSMTKBehavior::*)(pqSMTKWrapper*, pqServer*)) & pqSMTKBehavior::addedManagerOnServer, this, &pqSMTKCloseWithActiveOperationBehavior::trackActiveOperations); diff --git a/smtk/extension/paraview/appcomponents/pqSMTKRegisterImportersBehavior.cxx b/smtk/extension/paraview/appcomponents/pqSMTKRegisterImportersBehavior.cxx index c0a1eaae15652a80743fecbe608b43b2e0af5662..c2af7e0cd3bc90f90b32645785d14bfb83ca88f2 100644 --- a/smtk/extension/paraview/appcomponents/pqSMTKRegisterImportersBehavior.cxx +++ b/smtk/extension/paraview/appcomponents/pqSMTKRegisterImportersBehavior.cxx @@ -175,7 +175,7 @@ pqSMTKRegisterImportersBehavior::pqSMTKRegisterImportersBehavior(QObject* parent { QObject::connect( pqSMTKBehavior::instance(), - (void (pqSMTKBehavior::*)(pqSMTKWrapper*, pqServer*)) & pqSMTKBehavior::addedManagerOnServer, + (void(pqSMTKBehavior::*)(pqSMTKWrapper*, pqServer*)) & pqSMTKBehavior::addedManagerOnServer, this, &pqSMTKRegisterImportersBehavior::constructImporters); } diff --git a/smtk/extension/paraview/appcomponents/pqSMTKRenderResourceBehavior.cxx b/smtk/extension/paraview/appcomponents/pqSMTKRenderResourceBehavior.cxx index ac3af96ddd284aa43620eed2f797422deef3c65d..2dbdb90bc1fa7dcfb0f88ca87d97b158be6da2b9 100644 --- a/smtk/extension/paraview/appcomponents/pqSMTKRenderResourceBehavior.cxx +++ b/smtk/extension/paraview/appcomponents/pqSMTKRenderResourceBehavior.cxx @@ -112,7 +112,7 @@ pqSMTKRenderResourceBehavior::pqSMTKRenderResourceBehavior(QObject* parent) QObject::connect( pqSMTKBehavior::instance(), - (void (pqSMTKBehavior::*)(pqSMTKWrapper*, pqServer*)) & pqSMTKBehavior::addedManagerOnServer, + (void(pqSMTKBehavior::*)(pqSMTKWrapper*, pqServer*)) & pqSMTKBehavior::addedManagerOnServer, onAddedManagerOnServer); } diff --git a/smtk/extension/paraview/appcomponents/pqSMTKSaveOnCloseResourceBehavior.cxx b/smtk/extension/paraview/appcomponents/pqSMTKSaveOnCloseResourceBehavior.cxx index efd028a4c802a6fc91a57ae3b85b2d8f28e2bda4..a48e027918d793a8765c45a4623e8a1a052d4b4f 100644 --- a/smtk/extension/paraview/appcomponents/pqSMTKSaveOnCloseResourceBehavior.cxx +++ b/smtk/extension/paraview/appcomponents/pqSMTKSaveOnCloseResourceBehavior.cxx @@ -60,7 +60,7 @@ pqSMTKSaveOnCloseResourceBehavior::pqSMTKSaveOnCloseResourceBehavior(QObject* pa pqObjectBuilder* builder = pqCore->getObjectBuilder(); QObject::connect( builder, - (void (pqObjectBuilder::*)(pqPipelineSource*)) & pqObjectBuilder::destroying, + (void(pqObjectBuilder::*)(pqPipelineSource*)) & pqObjectBuilder::destroying, [](pqPipelineSource* source) { pqSMTKResource* smtkResource = dynamic_cast(source); if (smtkResource == nullptr) @@ -124,7 +124,7 @@ pqSMTKSaveOnCloseResourceBehavior::pqSMTKSaveOnCloseResourceBehavior(QObject* pa QObject::connect( pqSMTKBehavior::instance(), - (void (pqSMTKBehavior::*)(pqSMTKWrapper*, pqServer*)) & + (void(pqSMTKBehavior::*)(pqSMTKWrapper*, pqServer*)) & pqSMTKBehavior::removingManagerFromServer, onRemovingManagerFromServer); diff --git a/smtk/extension/paraview/markup/qtOntologyItem.cxx b/smtk/extension/paraview/markup/qtOntologyItem.cxx index bfb113bd34714d1f6eb7a0c7a9bc80a3c5178019..98c9a992a7cdc427baadd6300a4b7f6dce5a0ef1 100644 --- a/smtk/extension/paraview/markup/qtOntologyItem.cxx +++ b/smtk/extension/paraview/markup/qtOntologyItem.cxx @@ -575,13 +575,13 @@ void qtOntologyItem::updateUI() // When user chooses an identifier, update the labels and item values. QObject::connect( m_p->m_completer, - (void (QCompleter::*)(const QModelIndex&)) & QCompleter::activated, + (void(QCompleter::*)(const QModelIndex&)) & QCompleter::activated, this, &qtOntologyItem::modelEntryChosen); // When the user hovers over an identifier, update the labels (but not the item values). QObject::connect( m_p->m_completer, - (void (QCompleter::*)(const QModelIndex&)) & QCompleter::highlighted, + (void(QCompleter::*)(const QModelIndex&)) & QCompleter::highlighted, this, &qtOntologyItem::modelEntryHighlighted); // Clear label text when the user enters a non-match diff --git a/smtk/extension/qt/qtDiscreteValueEditor.cxx b/smtk/extension/qt/qtDiscreteValueEditor.cxx index 69ff792e098451de7faaac3d686e56471eb4750a..94b7cfa5568ee533638645f878831cb99b3afe9a 100644 --- a/smtk/extension/qt/qtDiscreteValueEditor.cxx +++ b/smtk/extension/qt/qtDiscreteValueEditor.cxx @@ -158,7 +158,7 @@ void qtDiscreteValueEditor::createWidget() QPointer guardedObject(this); QObject::connect( combo, - (void (QComboBox::*)(int)) & QComboBox::currentIndexChanged, + (void(QComboBox::*)(int)) & QComboBox::currentIndexChanged, this, [guardedObject]() { if (guardedObject) diff --git a/smtk/extension/qt/qtSMTKCallObserversOnMainThreadBehavior.cxx b/smtk/extension/qt/qtSMTKCallObserversOnMainThreadBehavior.cxx index c2571f27ea9ef139432cf2430b12f0d7cb8996fd..57031deea83f12bcb186d48ee7be56e0fd8a778b 100644 --- a/smtk/extension/qt/qtSMTKCallObserversOnMainThreadBehavior.cxx +++ b/smtk/extension/qt/qtSMTKCallObserversOnMainThreadBehavior.cxx @@ -72,7 +72,7 @@ void qtSMTKCallObserversOnMainThreadBehavior::forceObserversToBeCalledOnMainThre mgrs->get(); QObject::connect( this, - (void (qtSMTKCallObserversOnMainThreadBehavior::*)(QString, int, QPrivateSignal)) & + (void(qtSMTKCallObserversOnMainThreadBehavior::*)(QString, int, QPrivateSignal)) & qtSMTKCallObserversOnMainThreadBehavior::resourceEvent, this, [this, resourceManager](QString resourceId, int event) { @@ -124,7 +124,7 @@ void qtSMTKCallObserversOnMainThreadBehavior::forceObserversToBeCalledOnMainThre // functors. QObject::connect( this, - (void (qtSMTKCallObserversOnMainThreadBehavior::*)(QString, int, QString, QPrivateSignal)) & + (void(qtSMTKCallObserversOnMainThreadBehavior::*)(QString, int, QString, QPrivateSignal)) & qtSMTKCallObserversOnMainThreadBehavior::operationEvent, this, [this](QString operationId, int event, QString resultName) { @@ -164,7 +164,7 @@ void qtSMTKCallObserversOnMainThreadBehavior::forceObserversToBeCalledOnMainThre // functors. QObject::connect( this, - (void (qtSMTKCallObserversOnMainThreadBehavior::*)(QString, QString, QPrivateSignal)) & + (void(qtSMTKCallObserversOnMainThreadBehavior::*)(QString, QString, QPrivateSignal)) & qtSMTKCallObserversOnMainThreadBehavior::selectionEvent, this, [this](QString selectionId, QString qstr) { diff --git a/smtk/extension/qt/testing/cxx/unitQtComponentItem.cxx b/smtk/extension/qt/testing/cxx/unitQtComponentItem.cxx index df0e5096fe5eea1a0b0cec900b1137e638873d97..6c387bc77c3eaa0f1454df53bd729239898b272f 100644 --- a/smtk/extension/qt/testing/cxx/unitQtComponentItem.cxx +++ b/smtk/extension/qt/testing/cxx/unitQtComponentItem.cxx @@ -382,7 +382,7 @@ int unitQtComponentItem(int argc, char* argv[]) QObject::connect(ef, &qtEventFilter::reset, [&m_visibleThings, &phraseModel]() { phraseModel->root()->visitChildren( [&phraseModel, &m_visibleThings]( - smtk::view::DescriptivePhrasePtr cphr, std::vector & /*unused*/) -> int { + smtk::view::DescriptivePhrasePtr cphr, std::vector& /*unused*/) -> int { std::map::iterator it; if ( cphr->relatedComponent() && diff --git a/smtk/graph/ArcProperties.h b/smtk/graph/ArcProperties.h index d19de5f24c6a60ae513e251f71b4a0fe28768c4d..f37d442caa2e5383f98799ad8f97589f229aa96e 100644 --- a/smtk/graph/ArcProperties.h +++ b/smtk/graph/ArcProperties.h @@ -377,7 +377,7 @@ public: template constexpr typename std::enable_if::value, std::size_t>::type - maxOutDegree(std::size_t) + maxOutDegree(std::size_t) { return T::MaxOutDegree; } @@ -394,7 +394,7 @@ constexpr std::size_t maxOutDegree(...) template constexpr typename std::enable_if::value, std::size_t>::type - maxInDegree(std::size_t) + maxInDegree(std::size_t) { return T::MaxInDegree; } @@ -411,7 +411,7 @@ constexpr std::size_t maxInDegree(...) template constexpr typename std::enable_if::value, std::size_t>::type - minOutDegree(std::size_t) + minOutDegree(std::size_t) { return T::MinOutDegree; } @@ -428,7 +428,7 @@ constexpr std::size_t minOutDegree(...) template constexpr typename std::enable_if::value, std::size_t>::type - minInDegree(std::size_t) + minInDegree(std::size_t) { return T::MinInDegree; } diff --git a/smtk/graph/testing/cxx/TestScalability.cxx b/smtk/graph/testing/cxx/TestScalability.cxx index 15c84a43aa9d1d578076cee666e00dedb4c1493c..9e9fc1e0567dfd83e79febe016b3d42b644e9d1e 100644 --- a/smtk/graph/testing/cxx/TestScalability.cxx +++ b/smtk/graph/testing/cxx/TestScalability.cxx @@ -166,7 +166,7 @@ int TestScalability(int argc, char* argv[]) for (const auto& node : resource->nodes()) { std::dynamic_pointer_cast(node)->outgoing().visit( - [&](const Node * /* to */) -> smtk::common::Visit { return nooptimize; }); + [&](const Node* /* to */) -> smtk::common::Visit { return nooptimize; }); } timer.toc(); std::cout << "Visited " << num_node * degree_node << " arc(s) in " << timer.elapsed() << "(" @@ -193,7 +193,7 @@ int TestScalability(int argc, char* argv[]) for (const auto& node : resource->nodes()) { std::dynamic_pointer_cast(node)->outgoing().visit( - [&](const Node * /* to */) -> smtk::common::Visit { + [&](const Node* /* to */) -> smtk::common::Visit { narc++; return nooptimize; }); @@ -207,7 +207,7 @@ int TestScalability(int argc, char* argv[]) for (const auto& node : resource->nodes()) { std::dynamic_pointer_cast(node)->outgoing().visit( - [&](const Node * /* to */) -> smtk::common::Visit { + [&](const Node* /* to */) -> smtk::common::Visit { narc++; return nooptimize; }); diff --git a/smtk/mesh/core/Handle.h b/smtk/mesh/core/Handle.h index 3d2507f7008cb69a349850dad3f92390024e1df9..2653ffeb8980178ac59d6b75bd3801c627bbe8ea 100644 --- a/smtk/mesh/core/Handle.h +++ b/smtk/mesh/core/Handle.h @@ -44,8 +44,8 @@ namespace mesh typedef boost::icl::closed_interval HandleInterval; typedef boost::icl::interval_set HandleRange; -typedef decltype( - boost::icl::elements_begin(std::declval())) const_element_iterator; +typedef decltype(boost::icl::elements_begin( + std::declval())) const_element_iterator; /// Return an iterator to the first element in the range SMTKCORE_EXPORT const_element_iterator rangeElementsBegin(const HandleRange&); diff --git a/smtk/mesh/testing/cxx/TestElevateMesh.cxx b/smtk/mesh/testing/cxx/TestElevateMesh.cxx index 82d4cd9eb742ae3aff9521b4d7334fda102df7c6..46a4a513b437caf76c8a11764339a0aa46720b7b 100644 --- a/smtk/mesh/testing/cxx/TestElevateMesh.cxx +++ b/smtk/mesh/testing/cxx/TestElevateMesh.cxx @@ -89,9 +89,9 @@ public: ++i, counter += 3) { std::size_t bin = xyz[counter + 2] < m_min ? 0 - : xyz[counter + 2] > m_max - ? m_hist.size() - 1 - : static_cast((xyz[counter + 2] - m_min) / (m_max - m_min) * m_hist.size()); + : xyz[counter + 2] > m_max + ? m_hist.size() - 1 + : static_cast((xyz[counter + 2] - m_min) / (m_max - m_min) * m_hist.size()); ++m_hist[bin]; } } diff --git a/smtk/mesh/testing/cxx/TestElevateMeshOnStructuredGrid.cxx b/smtk/mesh/testing/cxx/TestElevateMeshOnStructuredGrid.cxx index 975aa704208fbe44b147ba1a2f2593421c3d08b1..5c55dd2f8efbc6ed29561b09ac25591961f06667 100644 --- a/smtk/mesh/testing/cxx/TestElevateMeshOnStructuredGrid.cxx +++ b/smtk/mesh/testing/cxx/TestElevateMeshOnStructuredGrid.cxx @@ -93,10 +93,10 @@ public: ++i, counter += 3) { std::size_t bin = xyz[counter + m_coord] < m_min ? 0 - : xyz[counter + m_coord] >= m_max - ? m_hist.size() - 1 - : static_cast( - (xyz[counter + m_coord] - m_min) / (m_max - m_min) * m_hist.size()); + : xyz[counter + m_coord] >= m_max + ? m_hist.size() - 1 + : static_cast( + (xyz[counter + m_coord] - m_min) / (m_max - m_min) * m_hist.size()); ++m_hist[bin]; } } diff --git a/smtk/mesh/testing/python/TestRuntimePyOperation.cxx b/smtk/mesh/testing/python/TestRuntimePyOperation.cxx index efb19309e9469953ccdabc339ff7f53a5e2c32e9..311872eee0237e92df2db4d749df7d05f43b52e6 100644 --- a/smtk/mesh/testing/python/TestRuntimePyOperation.cxx +++ b/smtk/mesh/testing/python/TestRuntimePyOperation.cxx @@ -84,9 +84,9 @@ public: for (c_it i = pointIds.begin(); i != pointIds.end(); ++i, counter += 3) { std::size_t bin = xyz[counter + 2] < m_min ? 0 - : xyz[counter + 2] > m_max - ? m_hist.size() - 1 - : static_cast((xyz[counter + 2] - m_min) / (m_max - m_min) * m_hist.size()); + : xyz[counter + 2] > m_max + ? m_hist.size() - 1 + : static_cast((xyz[counter + 2] - m_min) / (m_max - m_min) * m_hist.size()); ++m_hist[bin]; } } diff --git a/smtk/mesh/utility/ExtractTessellation.cxx b/smtk/mesh/utility/ExtractTessellation.cxx index c73ec2b5999e5c742d3ec594df3b4d358ebab5e3..27997a5cf13317b475ca30270c3ea20a62a77342 100644 --- a/smtk/mesh/utility/ExtractTessellation.cxx +++ b/smtk/mesh/utility/ExtractTessellation.cxx @@ -351,7 +351,7 @@ void extractTessellationInternal( //we are using VTK style connectivity or a compacted connectivity format. //determine the function pointer to use for the connectivity array - std::size_t (*addCellLen)(std::int64_t & conn, std::size_t index, int numPts) = + std::size_t (*addCellLen)(std::int64_t& conn, std::size_t index, int numPts) = detail::smtkToSMTKConn; if (tess.m_useVTKConnectivity) { diff --git a/smtk/model/EntityRef.h b/smtk/model/EntityRef.h index 59512aad8eaf8e0e753556f58154e4616d37f54b..0a27cfebf653f847b7032bbfb3512aec6d7b23a7 100644 --- a/smtk/model/EntityRef.h +++ b/smtk/model/EntityRef.h @@ -60,7 +60,10 @@ class MeshSet; } \ } \ ~thisclass() override = default; /* Avoid warnings about non-virtual destructor */ \ - bool isValid() const { return this->EntityRef::isValid(); } \ + bool isValid() const \ + { \ + return this->EntityRef::isValid(); \ + } \ bool isValid(EntityPtr* entRec) const override \ { \ EntityPtr er; \ diff --git a/smtk/view/ObjectGroupPhraseContent.cxx b/smtk/view/ObjectGroupPhraseContent.cxx index 37e6d84e7cab478e83ac28b84791a7cf19a74287..85b0ac24f89853d08209953eb480d872f7e8f2f4 100644 --- a/smtk/view/ObjectGroupPhraseContent.cxx +++ b/smtk/view/ObjectGroupPhraseContent.cxx @@ -90,7 +90,7 @@ void ObjectGroupPhraseContent::children(DescriptivePhrases& container) const const smtk::resource::ManagerPtr& rsrcMgr, const smtk::operation::ManagerPtr& /*unused*/, const smtk::view::ManagerPtr& /*unused*/, - const smtk::view::SelectionPtr & + const smtk::view::SelectionPtr& /*unused*/) -> smtk::common::Visit { if (!rsrcMgr) { @@ -142,7 +142,7 @@ bool ObjectGroupPhraseContent::hasChildren() const const smtk::resource::ManagerPtr& rsrcMgr, const smtk::operation::ManagerPtr& /*unused*/, const smtk::view::ManagerPtr& /*unused*/, - const smtk::view::SelectionPtr & + const smtk::view::SelectionPtr& /*unused*/) -> smtk::common::Visit { if (!rsrcMgr) { diff --git a/smtk/view/ReferenceItemPhraseModel.cxx b/smtk/view/ReferenceItemPhraseModel.cxx index 238edcb79a2d56715c88efea0fa81e8c05a5ba2a..f53295ec2241057b9a0f9e4da9b08f3987f84e9b 100644 --- a/smtk/view/ReferenceItemPhraseModel.cxx +++ b/smtk/view/ReferenceItemPhraseModel.cxx @@ -68,7 +68,7 @@ void ReferenceItemPhraseModel::populateRoot() const smtk::resource::ManagerPtr& rsrcMgr, const smtk::operation::ManagerPtr& /*unused*/, const smtk::view::ManagerPtr& /*unused*/, - const smtk::view::SelectionPtr & + const smtk::view::SelectionPtr& /*unused*/) -> smtk::common::Visit { if (rsrcMgr) {