d5be8cad97
* build: Add -Wsuggest-override We should always use the override specifier when overriding virtual functions. This helps prevent errors when a subclass tries to create a function with the same name as a virtual function in a super-class but with a different purpose. * clang-format * Upload logs on failure * Add override to unsupported.hpp * cmake: Make -Wsuggest-override flag conditional
28 lines
576 B
C++
28 lines
576 B
C++
#pragma once
|
|
|
|
#include "modules/meta/base.hpp"
|
|
|
|
POLYBAR_NS
|
|
|
|
namespace modules {
|
|
template <class Impl>
|
|
class static_module : public module<Impl> {
|
|
public:
|
|
using module<Impl>::module;
|
|
|
|
void start() override {
|
|
this->m_mainthread = thread([&] {
|
|
this->m_log.trace("%s: Thread id = %i", this->name(), concurrency_util::thread_id(this_thread::get_id()));
|
|
CAST_MOD(Impl)->update();
|
|
CAST_MOD(Impl)->broadcast();
|
|
});
|
|
}
|
|
|
|
bool build(builder*, string) const {
|
|
return true;
|
|
}
|
|
};
|
|
} // namespace modules
|
|
|
|
POLYBAR_NS_END
|