summaryrefslogtreecommitdiffstats
path: root/src/version.cpp
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2014-08-31 18:17:26 +0000
committerLiam P. White <inkscapebrony@gmail.com>2014-08-31 18:17:26 +0000
commit1f2d8bc4ce99e970cead4ca96c1859c383a9c043 (patch)
tree07731605bc486145ce5817c5f98a27b0136c7074 /src/version.cpp
parentMinor pass of header cleanup (diff)
downloadinkscape-1f2d8bc4ce99e970cead4ca96c1859c383a9c043.tar.gz
inkscape-1f2d8bc4ce99e970cead4ca96c1859c383a9c043.zip
Header cleanup: stop using Glib types where they aren't truly needed. Eases GThread deprecation errors.
(bzr r13341.1.190)
Diffstat (limited to 'src/version.cpp')
-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;
}
}