--- a/toycars_track_editor/src/TrackView.cxx +++ a/toycars_track_editor/src/TrackView.cxx @@ -89,7 +89,7 @@ TiXmlDocument *findXMLFile(const char *filename, SearchDirectories *dirs, char * //{jpg,png,bmp,pnm,pbm,pgm,ppm} Fl_Image* loadImage(const char *filename) { - char *suffix = strrchr(filename, '.'); + const char *suffix = strrchr(filename, '.'); if (suffix == NULL) return NULL; if (strcmp(suffix,".jpg") == 0) @@ -969,13 +969,13 @@ void TrackView::installMap(const char *name) uninstallMap(name); // chop off any .xml suffix - temp = strrchr(name, '.'); + temp = const_cast( strrchr(name, '.') ); if (temp) { if (strcmp(temp, ".xml") == 0) temp[0] = '\0'; } // remove path - temp = strrchr(name, '/'); + temp = const_cast( strrchr(name, '/') ); if (temp) { strncpy(trackname, temp+1, 255); } @@ -1044,13 +1044,13 @@ void TrackView::uninstallMap(const char *name) char *temp; // chop off any .xml suffix - temp = strrchr(name, '.'); + temp = const_cast( strrchr(name, '.') ); if (temp) { if (strcmp(temp, ".xml") == 0) temp[0] = '\0'; } // remove path - temp = strrchr(name, '/'); + temp = const_cast( strrchr(name, '/') ); if (temp) { strncpy(trackname, temp+1, 255); } --- a/toycars_vehicle_editor/src/LoadSpriteFromImage.cpp +++ a/toycars_vehicle_editor/src/LoadSpriteFromImage.cpp @@ -23,7 +23,7 @@ //{jpg,png,bmp,pnm,pbm,pgm,ppm} Fl_Image* loadImage(const char *filename) { - char *suffix = strrchr(filename, '.'); + const char *suffix = strrchr(filename, '.'); if (suffix == NULL) return NULL; if (strcmp(suffix,".jpg") == 0) --- a/toycars_vehicle_editor/src/VehicleObject.cpp +++ a/toycars_vehicle_editor/src/VehicleObject.cpp @@ -533,13 +533,13 @@ void VehicleObject::installVehicle(const char *name) uninstallVehicle(name); // chop off any .xml suffix - temp = strrchr(name, '.'); + temp = const_cast( strrchr(name, '.') ); if (temp) { if (strcmp(temp, ".xml") == 0) temp[0] = '\0'; } // remove path - temp = strrchr(name, '/'); + temp = const_cast( strrchr(name, '/') ); if (temp) { strncpy(carname, temp+1, 255); } @@ -610,13 +610,13 @@ void VehicleObject::uninstallVehicle(const char *name) char *temp; // chop off any .xml suffix - temp = strrchr(name, '.'); + temp = const_cast( strrchr(name, '.') ); if (temp) { if (strcmp(temp, ".xml") == 0) temp[0] = '\0'; } // remove path - temp = strrchr(name, '/'); + temp = const_cast( strrchr(name, '/') ); if (temp) { strncpy(carname, temp+1, 255); } @@ -675,4 +675,4 @@ void VehicleObject::uninstallVehicle(const char *name) system(str); */ #endif -} +}