summaryrefslogtreecommitdiffstats
path: root/src/version.cpp
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2014-09-27 14:17:45 +0000
committerLiam P. White <inkscapebrony@gmail.com>2014-09-27 14:17:45 +0000
commitfa9bd6393f316dab9303569b28f6b5d179fedd61 (patch)
tree33df00632f850a6f117978c36145feeac05f1a4c /src/version.cpp
parentUpdate to experimental r13527 (diff)
downloadinkscape-fa9bd6393f316dab9303569b28f6b5d179fedd61.tar.gz
inkscape-fa9bd6393f316dab9303569b28f6b5d179fedd61.zip
Update to experimental r13565
(bzr r13341.5.16)
Diffstat (limited to '')
-rw-r--r--src/version.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/version.cpp b/src/version.cpp
index 68729c62e..abe855ee7 100644
--- a/src/version.cpp
+++ b/src/version.cpp
@@ -12,14 +12,14 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <glib.h>
#include <sstream>
-
#include "version.h"
-gboolean sp_version_from_string(const gchar *string, Inkscape::Version *version)
+bool sp_version_from_string(const char *string, Inkscape::Version *version)
{
if (!string) {
- return FALSE;
+ return false;
}
try
@@ -40,27 +40,27 @@ gboolean sp_version_from_string(const gchar *string, Inkscape::Version *version)
}
}
-gchar *sp_version_to_string(Inkscape::Version version)
+char *sp_version_to_string(Inkscape::Version version)
{
return g_strdup_printf("%u.%u", version._major, version._minor);
}
-gboolean sp_version_inside_range(Inkscape::Version version,
- unsigned major_min, unsigned minor_min,
- unsigned major_max, unsigned minor_max)
+bool sp_version_inside_range(Inkscape::Version version,
+ unsigned major_min, unsigned minor_min,
+ unsigned major_max, unsigned minor_max)
{
if ( version._major < major_min || version._major > major_max ) {
- return FALSE;
+ return false;
} else if ( version._major == major_min &&
version._minor <= minor_min )
{
- return FALSE;
+ return false;
} else if ( version._major == major_max &&
version._minor >= minor_max )
{
- return FALSE;
+ return false;
} else {
- return TRUE;
+ return true;
}
}