reapack

Package manager for REAPER
Log | Files | Refs | Submodules | README | LICENSE

commit 51637b33fe42135f6006b5399c2d58acafabd58e
parent d7bce42c46a73da3c0fc18f748f1b5e22a0be1ed
Author: cfillion <cfillion@users.noreply.github.com>
Date:   Sat,  9 Jul 2016 22:05:21 -0400

mild refactoring

Diffstat:
Msrc/time.cpp | 2+-
Msrc/time.hpp | 2+-
Msrc/version.cpp | 8--------
Msrc/version.hpp | 2+-
4 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/src/time.cpp b/src/time.cpp @@ -23,7 +23,7 @@ using namespace std; -Time::Time(const string &iso8601) : m_tm() +Time::Time(const char *iso8601) : m_tm() { tm time = {}; diff --git a/src/time.hpp b/src/time.hpp @@ -23,7 +23,7 @@ class Time { public: - Time(const std::string &); + Time(const char *iso8601); Time(int year, int month, int day, int hour = 0, int minute = 0, int second = 0); Time(const std::tm &tm = {}) : m_tm(tm) {} diff --git a/src/version.cpp b/src/version.cpp @@ -135,14 +135,6 @@ void Version::setChangelog(const string &changelog) m_changelog = changelog; } -void Version::setTime(const char *iso8601) -{ - const Time time(iso8601); - - if(time) - m_time = time; -} - const Source *Version::source(const size_t index) const { auto it = m_sources.begin(); diff --git a/src/version.hpp b/src/version.hpp @@ -55,7 +55,7 @@ public: const std::string &author() const { return m_author; } std::string displayAuthor() const; - void setTime(const char *iso8601); + void setTime(const Time &time) { if(time) m_time = time; } const Time &time() const { return m_time; } void setChangelog(const std::string &);