-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert "constexpr version" #4496
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
/* | ||
* This software is distributed under BSD 3-clause license (see LICENSE file). | ||
* | ||
* Authors: Soeren Sonnenburg, Heiko Strathmann, Yuyu Zhang, Viktor Gal, | ||
* Thoralf Klein, Evan Shelhamer, Sergey Lisitsyn, | ||
* Authors: Soeren Sonnenburg, Heiko Strathmann, Yuyu Zhang, Viktor Gal, | ||
* Thoralf Klein, Evan Shelhamer, Sergey Lisitsyn, | ||
* Evangelos Anagnostopoulos | ||
*/ | ||
|
||
|
@@ -12,7 +12,6 @@ | |
#define VERSION_H__ | ||
|
||
#include <shogun/lib/config.h> | ||
#include <shogun/lib/versionstring.h> | ||
|
||
namespace shogun | ||
{ | ||
|
@@ -36,59 +35,37 @@ class Version | |
static void print_version(); | ||
|
||
/** get main version */ | ||
static constexpr const char* get_version_main() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. need to keep the equivalent of this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should be fixed in the commit below... |
||
return version_main; | ||
} | ||
static const char* get_version_main(); | ||
|
||
/** get version extra */ | ||
static constexpr const char* get_version_extra() { | ||
return version_extra; | ||
} | ||
static const char* get_version_extra(); | ||
|
||
/** get version release */ | ||
static constexpr const char* get_version_release() { | ||
return version_release; | ||
} | ||
static const char* get_version_release(); | ||
|
||
/** get version revision */ | ||
static constexpr int64_t get_version_revision() { | ||
return version_revision; | ||
} | ||
static int64_t get_version_revision(); | ||
|
||
/** get version year */ | ||
static constexpr int32_t get_version_year() { | ||
return version_year; | ||
} | ||
static int32_t get_version_year(); | ||
|
||
/** get version month */ | ||
static constexpr int32_t get_version_month() { | ||
return version_month; | ||
} | ||
static int32_t get_version_month(); | ||
|
||
/** get version day */ | ||
static constexpr int32_t get_version_day() { | ||
return version_day; | ||
} | ||
static int32_t get_version_day(); | ||
|
||
/** get version hour */ | ||
static constexpr int32_t get_version_hour() { | ||
return version_hour; | ||
} | ||
static int32_t get_version_hour(); | ||
|
||
/** get version minute */ | ||
static constexpr int32_t get_version_minute() { | ||
return version_minute; | ||
} | ||
static int32_t get_version_minute(); | ||
|
||
/** get parameter serialization version */ | ||
static constexpr int32_t get_version_parameter() { | ||
return version_parameter; | ||
} | ||
static int32_t get_version_parameter(); | ||
|
||
/** get version in minutes */ | ||
static constexpr int64_t get_version_in_minutes() { | ||
return version_minute; | ||
} | ||
static int64_t get_version_in_minutes(); | ||
|
||
/** ref object | ||
* @return ref count | ||
|
@@ -107,26 +84,25 @@ class Version | |
|
||
protected: | ||
/** version release */ | ||
static constexpr char version_release[128] = VERSION_RELEASE; | ||
static const char version_release[128]; | ||
/** version main */ | ||
static const char version_main[32]; | ||
/** version extra */ | ||
static constexpr char version_extra[128] = VERSION_EXTRA; | ||
|
||
static const char version_extra[128]; | ||
/** version revision */ | ||
static constexpr int64_t version_revision = VERSION_REVISION; | ||
static const int64_t version_revision; | ||
/** version year */ | ||
static constexpr int32_t version_year = VERSION_YEAR; | ||
static const int32_t version_year; | ||
/** version month */ | ||
static constexpr int32_t version_month = VERSION_MONTH; | ||
static const int32_t version_month; | ||
/** version day */ | ||
static constexpr int32_t version_day = VERSION_DAY; | ||
static const int32_t version_day; | ||
/** version hour */ | ||
static constexpr int32_t version_hour = VERSION_HOUR; | ||
static const int32_t version_hour; | ||
/** version minute */ | ||
static constexpr int32_t version_minute = VERSION_MINUTE; | ||
static const int32_t version_minute; | ||
/** version parameter */ | ||
static constexpr int32_t version_parameter = VERSION_PARAMETER; | ||
/** version main */ | ||
static constexpr char version_main[32] = MAINVERSION; | ||
static const int32_t version_parameter; | ||
|
||
private: | ||
RefCount* m_refcount; | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool thanks!