refactor(core): Clean-up

- use "#pragma once" instead of the regular include guard
- fix errors and warnings reported by cppcheck
This commit is contained in:
Michael Carlberg 2016-05-31 05:58:58 +02:00
parent d0499d4d15
commit 39d3f61497
81 changed files with 588 additions and 730 deletions
include/modules

View file

@ -1,5 +1,4 @@
#ifndef _MODULES_MEMORY_HPP_
#define _MODULES_MEMORY_HPP_
#pragma once
#include <atomic>
@ -12,9 +11,9 @@ namespace modules
{
DefineModule(MemoryModule, TimerModule)
{
const char *TAG_LABEL = "<label>";
const char *TAG_BAR_USED = "<bar:used>";
const char *TAG_BAR_FREE = "<bar:free>";
static constexpr auto TAG_LABEL = "<label>";
static constexpr auto TAG_BAR_USED = "<bar:used>";
static constexpr auto TAG_BAR_FREE = "<bar:free>";
std::unique_ptr<drawtypes::Bar> bar_used;
std::unique_ptr<drawtypes::Bar> bar_free;
@ -25,11 +24,9 @@ namespace modules
std::atomic<int> percentage_free;
public:
MemoryModule(const std::string& name);
explicit MemoryModule(const std::string& name);
bool update();
bool build(Builder *builder, const std::string& tag);
};
}
#endif