You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: include/OpenShotVersion.h.in
+12-20Lines changed: 12 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -43,36 +43,28 @@
43
43
#defineOPENSHOT_VERSION_SO @PROJECT_SO_VERSION@ /// Shared object version number. This increments any time the API and ABI changes (so old apps will no longer link)
44
44
45
45
#include<sstream>
46
-
usingnamespacestd;
47
46
48
47
namespaceopenshot
49
48
{
50
49
/// This struct holds version number information. Use the GetVersion() method to access the current version of libopenshot.
51
50
structOpenShotVersion {
52
-
intmajor; /// Major version number
53
-
intminor; /// Minor version number
54
-
intbuild; /// Build number
55
-
intso; /// Shared Object Number (incremented when API or ABI changes)
51
+
staticconstintMajor=OPENSHOT_VERSION_MAJOR; /// Major version number
52
+
staticconstintMinor=OPENSHOT_VERSION_MINOR; /// Minor version number
53
+
staticconstintBuild=OPENSHOT_VERSION_BUILD; /// Build number
54
+
staticconstintSo=OPENSHOT_VERSION_SO; /// Shared Object Number (incremented when API or ABI changes)
56
55
57
56
/// Get a string version of the version (i.e. "Major.Minor.Build")
58
-
stringToString() {
59
-
stringstreamversion_string;
60
-
version_string << major << "." << minor << "." << build;
57
+
inlinestaticconststd::stringToString() {
58
+
std::stringstreamversion_string;
59
+
version_string << Major << "." << Minor << "." << Build;
61
60
returnversion_string.str();
62
61
}
63
62
};
64
63
65
-
/// Get the current version number of libopenshot (major, minor, and build number)
66
-
staticOpenShotVersionGetVersion() {
67
-
OpenShotVersionversion;
68
-
69
-
// Set version info
70
-
version.major=OPENSHOT_VERSION_MAJOR;
71
-
version.minor=OPENSHOT_VERSION_MINOR;
72
-
version.build=OPENSHOT_VERSION_BUILD;
73
-
version.so=OPENSHOT_VERSION_SO;
64
+
staticconstopenshot::OpenShotVersionVersion;
74
65
75
-
returnversion;
76
-
}
66
+
/// Get the current version number of libopenshot (major, minor, and build number)
0 commit comments