Skip to content

Commit

Permalink
Merge Fix EnableLogging superclass
Browse files Browse the repository at this point in the history
Fix EnableLogging superclass

Related PR: #841
  • Loading branch information
yhmtsai committed Aug 5, 2021
2 parents 5c48189 + e8001b5 commit 6c5ff35
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions include/ginkgo/core/log/logger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ class Loggable {
* class.
*/
template <typename ConcreteLoggable, typename PolymorphicBase = Loggable>
class EnableLogging : public Loggable {
class EnableLogging : public PolymorphicBase {
public:
void add_logger(std::shared_ptr<const Logger> logger) override
{
Expand All @@ -593,10 +593,9 @@ class EnableLogging : public Loggable {

void remove_logger(const Logger *logger) override
{
auto idx = find_if(begin(loggers_), end(loggers_),
[&logger](std::shared_ptr<const Logger> l) {
return lend(l) == logger;
});
auto idx =
find_if(begin(loggers_), end(loggers_),
[&logger](const auto &l) { return lend(l) == logger; });
if (idx != end(loggers_)) {
loggers_.erase(idx);
} else {
Expand Down

0 comments on commit 6c5ff35

Please sign in to comment.