summaryrefslogtreecommitdiffstats
path: root/src/version.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-11-23 23:36:49 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-11-23 23:36:49 +0000
commit0969085ddf607a7a98cf7fd6d9b10da5fbebe62d (patch)
tree59b2bc9ed3412ab2de4c703ef30342dfe2401704 /src/version.cpp
parentrefactor from lastApplied (diff)
parentFixed a bug pointed by suv running from comand line, also removed another des... (diff)
downloadinkscape-0969085ddf607a7a98cf7fd6d9b10da5fbebe62d.tar.gz
inkscape-0969085ddf607a7a98cf7fd6d9b10da5fbebe62d.zip
fixing to trunk
(bzr r12588.1.34)
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;
}
}