From 3fbf39b25d3ab95cab83baf198a24a7d6ad3689b Mon Sep 17 00:00:00 2001 From: DukePyrolator Date: Sun, 13 Mar 2011 03:42:30 -0400 Subject: Added some useful Anope::Version functions to prevent some files from unnecessarily rebuilding on every make --- include/anope.h | 8 ++++++-- include/modules.h | 14 +++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/anope.h b/include/anope.h index 8153c976f..1a8612241 100644 --- a/include/anope.h +++ b/include/anope.h @@ -299,8 +299,12 @@ namespace Anope extern CoreExport time_t CurTime; extern CoreExport string Version(); - - extern CoreExport string Build(); + extern CoreExport string VersionShort(); + extern CoreExport string VersionBuildString(); + extern CoreExport int VersionMajor(); + extern CoreExport int VersionMinor(); + extern CoreExport int VersionPatch(); + extern CoreExport int VersionBuild(); /** Check whether two strings match. * @param str The string to check against the pattern (e.g. foobar) diff --git a/include/modules.h b/include/modules.h index 97cb49697..0918a67f8 100644 --- a/include/modules.h +++ b/include/modules.h @@ -165,9 +165,9 @@ extern CoreExport std::list Modules; class Version { private: - unsigned Major; - unsigned Minor; - unsigned Build; + int Major; + int Minor; + int Build; public: /** Constructor @@ -175,7 +175,7 @@ class Version * @param vMinor The minor version numbber * @param vBuild The build version numbber */ - Version(unsigned vMajor, unsigned vMinor, unsigned vBuild); + Version(int vMajor, int vMinor, int vBuild); /** Destructor */ @@ -184,17 +184,17 @@ class Version /** Get the major version of Anope this was built against * @return The major version */ - unsigned GetMajor() const; + int GetMajor() const; /** Get the minor version of Anope this was built against * @return The minor version */ - unsigned GetMinor() const; + int GetMinor() const; /** Get the build version this was built against * @return The build version */ - unsigned GetBuild() const; + int GetBuild() const; }; /* Forward declaration of CallBack class for the Module class */ -- cgit