diff options
| author | DukePyrolator <DukePyrolator@anope.org> | 2011-03-13 03:42:30 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2011-03-13 03:42:30 -0400 |
| commit | 3fbf39b25d3ab95cab83baf198a24a7d6ad3689b (patch) | |
| tree | 0b785f887b531ace1649ed019836b04954f3b460 /include | |
| parent | 15a833283b0ec501f8c986b269b8360c6aa923f9 (diff) | |
Added some useful Anope::Version functions to prevent some files from unnecessarily rebuilding on every make
Diffstat (limited to 'include')
| -rw-r--r-- | include/anope.h | 8 | ||||
| -rw-r--r-- | include/modules.h | 14 |
2 files changed, 13 insertions, 9 deletions
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<Module *> 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 */ |
