aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xbmc/addons/AddonVersion.h12
-rw-r--r--xbmc/addons/addoninfo/AddonInfoBuilder.h3
2 files changed, 8 insertions, 7 deletions
diff --git a/xbmc/addons/AddonVersion.h b/xbmc/addons/AddonVersion.h
index aacd9e3816..1d32bcbcdf 100644
--- a/xbmc/addons/AddonVersion.h
+++ b/xbmc/addons/AddonVersion.h
@@ -27,16 +27,20 @@ namespace ADDON
class AddonVersion
{
public:
- AddonVersion(const AddonVersion& other) { *this = other; }
- explicit AddonVersion(const std::string& version);
explicit AddonVersion(const char* version = nullptr);
+ explicit AddonVersion(const std::string& version);
+
+ AddonVersion(const AddonVersion& other) = default;
+ AddonVersion(AddonVersion&& other) = default;
+ AddonVersion& operator=(const AddonVersion& other) = default;
+ AddonVersion& operator=(AddonVersion&& other) = default;
+
virtual ~AddonVersion() = default;
int Epoch() const { return mEpoch; }
const std::string &Upstream() const { return mUpstream; }
const std::string &Revision() const { return mRevision; }
- AddonVersion& operator=(const AddonVersion& other);
bool operator< (const AddonVersion& other) const;
bool operator> (const AddonVersion& other) const;
bool operator<=(const AddonVersion& other) const;
@@ -56,6 +60,4 @@ namespace ADDON
static int CompareComponent(const char *a, const char *b);
};
-
- inline AddonVersion& AddonVersion::operator=(const AddonVersion& other) = default;
}
diff --git a/xbmc/addons/addoninfo/AddonInfoBuilder.h b/xbmc/addons/addoninfo/AddonInfoBuilder.h
index e29471ac5f..08fdaa6734 100644
--- a/xbmc/addons/addoninfo/AddonInfoBuilder.h
+++ b/xbmc/addons/addoninfo/AddonInfoBuilder.h
@@ -56,8 +56,7 @@ public:
}
void SetPath(std::string path) { m_addonInfo->m_path = std::move(path); }
void SetLibName(std::string libname) { m_addonInfo->m_libname = std::move(libname); }
- void SetVersion(const AddonVersion& version) { m_addonInfo->m_version = version; }
- void SetMinVersion(const AddonVersion& minversion) { m_addonInfo->m_minversion = minversion; }
+ void SetVersion(AddonVersion version) { m_addonInfo->m_version = std::move(version); }
void SetDependencies(std::vector<DependencyInfo> dependencies) { m_addonInfo->m_dependencies = std::move(dependencies); }
void SetExtrainfo(InfoMap extrainfo)
{