Skip to content
Snippets Groups Projects
Unverified Commit d5a0ef96 authored by Dr. Felix Tobias Schindler's avatar Dr. Felix Tobias Schindler Committed by René Fritze
Browse files

Revert "[walker] Try to warn if someone forgot to call walk()"

This reverts commit dd9bd39c3febe7141a0385a0976a3d026f099df9,
as it produces undesirable warnings if the walker was
appended to another walker.
parent 392bee87
No related branches found
No related tags found
No related merge requests found
......@@ -83,14 +83,12 @@ private:
public:
explicit Walker(GridViewType grd_vw)
: grid_view_(grd_vw)
, user_decided_agains_clearing_of_functors_(false)
{
}
Walker(const ThisType& other)
: BaseType()
, grid_view_(other.grid_view_)
, user_decided_agains_clearing_of_functors_(other.user_decided_agains_clearing_of_functors_)
{
// Since all Common::PerThreadValue are created with the same size given by the global singleton threadManage(),
// we just assume they are of the same size!
......@@ -123,20 +121,6 @@ public:
~Walker()
{
#ifndef DXT_DISABLE_WARNINGS
// Warn if there are functors left, since we assume someone forgot to walk()!
if (!user_decided_agains_clearing_of_functors_
&& element_functor_wrappers_->size() + intersection_functor_wrappers_->size()
+ element_and_intersection_functor_wrappers_->size()
> 0) {
Common::TimedLogger().get("dune.xt.grid.walker").warn()
<< "[warning when descructing Walker] there are still uncleared functors, which indicates that you forgot to "
"call walk()!"
<< "\n"
<< "(To disable this warning, #define DXT_DISABLE_WARNINGS at compile time or configure the TimedLogger at "
"runtime.)";
}
#endif // DXT_DISABLE_WARNINGS
} // ~Walker(...)
const GridViewType& grid_view() const
......@@ -420,7 +404,6 @@ public:
void walk(const bool use_tbb = false, const bool clear_functors = true)
{
user_decided_agains_clearing_of_functors_ = !clear_functors;
#if HAVE_TBB
if (use_tbb) {
const auto num_partitions =
......@@ -505,7 +488,6 @@ public:
template <class PartioningType>
void walk(PartioningType& partitioning, const bool clear_functors = true)
{
user_decided_agains_clearing_of_functors_ = !clear_functors;
// prepare functors
prepare();
......@@ -577,7 +559,6 @@ private:
} // ... walk_range(...)
GridViewType grid_view_;
bool user_decided_agains_clearing_of_functors_;
Common::PerThreadValue<std::list<std::shared_ptr<internal::ElementFunctorWrapper<GridViewType>>>>
element_functor_wrappers_;
Common::PerThreadValue<std::list<std::shared_ptr<internal::IntersectionFunctorWrapper<GridViewType>>>>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment