Gcode: Use const_cast to silence warning
authorBen Gamari <bgamari.foss@gmail.com>
Wed, 23 Jan 2013 05:04:37 +0000 (00:04 -0500)
committerBen Gamari <bgamari.foss@gmail.com>
Wed, 23 Jan 2013 05:18:48 +0000 (00:18 -0500)
src/modules/communication/utils/Gcode.cpp

index d64bfe8..c76c4cd 100644 (file)
@@ -80,7 +80,7 @@ int Gcode::get_int( char letter )
                 if( is_numeric(buffer[j]) )
                 {
                     const char* endptr = &buffer[j];
-                    int r = strtol(&buffer[j], (char**) &endptr, 10);
+                    int r = strtol(&buffer[j], const_cast<char**>(&endptr), 10);
                     if (endptr > command.c_str())
                         return r;
                     return 0;