Code

(noop): io/uristream.cpp: Remove some unneeded gchar/char casts. Change constness...
authorpjrm <pjrm@users.sourceforge.net>
Thu, 11 Oct 2007 14:05:24 +0000 (14:05 +0000)
committerpjrm <pjrm@users.sourceforge.net>
Thu, 11 Oct 2007 14:05:24 +0000 (14:05 +0000)
src/io/uristream.cpp

index e06498d527ddc5d84e8f9bb7072130f6781a4785..9787620dbd27b2eca2135103385fb3b7420e7948 100644 (file)
@@ -105,19 +105,19 @@ UriInputStream::UriInputStream(Inkscape::URI &source)
                     throw (StreamException): uri(source)
 {
     //get information from uri
-    char *schemestr = (char *) uri.getScheme();
+    char const *schemestr = uri.getScheme();
     scheme = SCHEME_FILE;
     if (!schemestr || strncmp("file", schemestr, 4)==0)
         scheme = SCHEME_FILE;
     else if (strncmp("data", schemestr, 4)==0)
         scheme = SCHEME_DATA;
     //printf("in schemestr:'%s' scheme:'%d'\n", schemestr, scheme);
-    char *cpath = NULL;
+    gchar *cpath = NULL;
 
     switch (scheme) {
 
         case SCHEME_FILE:
-            cpath     = (char *) uri.toNativeFilename();
+            cpath = uri.toNativeFilename();
             //printf("in cpath:'%s'\n", cpath);
             inf = fopen_utf8name(cpath, FILE_READ);
             //inf = fopen(cpath, "rb");
@@ -317,18 +317,18 @@ UriOutputStream::UriOutputStream(Inkscape::URI &destination)
                                              scheme(SCHEME_FILE)
 {
     //get information from uri
-    char *schemestr = (char *) uri.getScheme();
+    char const *schemestr = uri.getScheme();
     if (!schemestr || strncmp("file", schemestr, 4)==0)
         scheme = SCHEME_FILE;
     else if (strncmp("data", schemestr, 4)==0)
         scheme = SCHEME_DATA;
     //printf("out schemestr:'%s' scheme:'%d'\n", schemestr, scheme);
-    char *cpath = NULL;
+    gchar *cpath = NULL;
 
     switch (scheme) {
 
         case SCHEME_FILE:
-            cpath     = (char *) uri.toNativeFilename();
+            cpath = uri.toNativeFilename();
             //printf("out path:'%s'\n", cpath);
             outf = fopen_utf8name(cpath, FILE_WRITE);
             //outf = fopen(cpath, "wb");