Skip to content
This repository has been archived by the owner on May 9, 2019. It is now read-only.

Commit

Permalink
refs #46 Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
yoos committed Apr 10, 2016
1 parent 5ae14a1 commit 0e8a468
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions src/logger/logged_variable.hpp
Original file line number Diff line number Diff line change
@@ -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"

Expand All @@ -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;
Expand All @@ -26,13 +26,13 @@ LoggedVariable<double>::LoggedVariable(LoggedVariableRegistry& registry, double
}

template <typename T>
T LoggedVariable<T>::get() {
T LoggedVariable<T>::v() {
return value;
}

template <typename T>
void LoggedVariable<T>::update(T value) {
void LoggedVariable<T>::set(T value) {
this->value = value;
}

#endif // LOGGED_VARIABLE_H_
#endif // LOGGED_VARIABLE_HPP
6 changes: 3 additions & 3 deletions src/logger/logged_variable_registry.hpp
Original file line number Diff line number Diff line change
@@ -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 <vector>

Expand All @@ -17,4 +17,4 @@ class LoggedVariableRegistry {
std::vector<LoggedVariable<double> *> doubles;
};

#endif // LOGGED_VARIABLE_REGISTRY_H_
#endif // LOGGED_VARIABLE_REGISTRY_HPP

0 comments on commit 0e8a468

Please sign in to comment.