From 0e8a4685c87013d4af00fd864f2a08c898922690 Mon Sep 17 00:00:00 2001 From: Soo-Hyun Yoo Date: Sun, 10 Apr 2016 16:19:57 -0700 Subject: [PATCH] refs #46 Refactor --- src/logger/logged_variable.hpp | 14 +++++++------- src/logger/logged_variable_registry.hpp | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/logger/logged_variable.hpp b/src/logger/logged_variable.hpp index 1097659..6767adc 100644 --- a/src/logger/logged_variable.hpp +++ b/src/logger/logged_variable.hpp @@ -1,5 +1,5 @@ -#ifndef LOGGED_VARIABLE_H_ -#define LOGGED_VARIABLE_H_ +#ifndef LOGGED_VARIABLE_HPP +#define LOGGED_VARIABLE_HPP #include "logger/logged_variable_registry.hpp" @@ -8,8 +8,8 @@ class LoggedVariable { public: LoggedVariable(LoggedVariableRegistry& registry, T value); - T get(); - void update(T value); + T v(); // Get value + void set(T value); private: T value; @@ -26,13 +26,13 @@ LoggedVariable::LoggedVariable(LoggedVariableRegistry& registry, double } template -T LoggedVariable::get() { +T LoggedVariable::v() { return value; } template -void LoggedVariable::update(T value) { +void LoggedVariable::set(T value) { this->value = value; } -#endif // LOGGED_VARIABLE_H_ +#endif // LOGGED_VARIABLE_HPP diff --git a/src/logger/logged_variable_registry.hpp b/src/logger/logged_variable_registry.hpp index 8384fa2..49b6f7f 100644 --- a/src/logger/logged_variable_registry.hpp +++ b/src/logger/logged_variable_registry.hpp @@ -1,5 +1,5 @@ -#ifndef LOGGED_VARIABLE_REGISTRY_H_ -#define LOGGED_VARIABLE_REGISTRY_H_ +#ifndef LOGGED_VARIABLE_REGISTRY_HPP +#define LOGGED_VARIABLE_REGISTRY_HPP #include @@ -17,4 +17,4 @@ class LoggedVariableRegistry { std::vector *> doubles; }; -#endif // LOGGED_VARIABLE_REGISTRY_H_ +#endif // LOGGED_VARIABLE_REGISTRY_HPP