[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/input axis_factory.cxx,1.7,1.8 button
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/input axis_factory.cxx,1.7,1.8 button_factory.cxx,1.6,1.7 pointer_factory.cxx,1.4,1.5 scroller_factory.cxx,1.5,1.6 |
Date: |
22 Aug 2002 00:36:32 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/input
In directory dark:/tmp/cvs-serv7629/input
Modified Files:
axis_factory.cxx button_factory.cxx pointer_factory.cxx
scroller_factory.cxx
Log Message:
- replaced some incorrect free()'s with xmlFree()
- added some Free[tm] sounds
- some quirks in the sound code, no fix, but at least it no longer crashes
Index: axis_factory.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/input/axis_factory.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- axis_factory.cxx 16 Aug 2002 15:14:00 -0000 1.7
+++ axis_factory.cxx 22 Aug 2002 00:36:30 -0000 1.8
@@ -64,7 +64,7 @@
PingusError::raise("ButtonAxis without angle parameter");
float angle = strtod(angle_str, reinterpret_cast<char**>(NULL));
- free(angle_str);
+ xmlFree(angle_str);
cur = XMLhelper::skip_blank(cur->children);
Button* button1 = ButtonFactory::create(cur);
@@ -98,9 +98,9 @@
int id = strtol(id_str, reinterpret_cast<char**>(NULL), 10);
int axis = strtol(axis_str, reinterpret_cast<char**>(NULL), 10);
- free(angle_str);
- free(id_str);
- free(axis_str);
+ xmlFree(angle_str);
+ xmlFree(id_str);
+ xmlFree(axis_str);
return new JoystickAxis(id, axis, angle);
}
@@ -118,8 +118,8 @@
float angle = strtod(angle_str, reinterpret_cast<char**>(NULL));
int axis = strtol(axis_str, reinterpret_cast<char**>(NULL), 10);
- free(angle_str);
- free(axis_str);
+ xmlFree(angle_str);
+ xmlFree(axis_str);
return new MouseAxis(axis, angle);
}
Index: button_factory.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/input/button_factory.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- button_factory.cxx 16 Aug 2002 15:14:00 -0000 1.6
+++ button_factory.cxx 22 Aug 2002 00:36:30 -0000 1.7
@@ -85,8 +85,8 @@
int id = strtol(id_str, reinterpret_cast<char**>(NULL), 10);
int button = strtol(button_str, reinterpret_cast<char**>(NULL), 10);
- free(id_str);
- free(button_str);
+ xmlFree(id_str);
+ xmlFree(button_str);
return new JoystickButton(id, button);
}
@@ -99,7 +99,7 @@
int key = KeyHelper::string_to_key(key_str);
- free(key_str);
+ xmlFree(key_str);
return new KeyButton(key);
}
@@ -111,7 +111,7 @@
PingusError::raise("MouseButton without button parameter");
int button = strtol(button_str, reinterpret_cast<char**>(NULL), 10);
- free(button_str);
+ xmlFree(button_str);
return new MouseButton(button);
}
Index: pointer_factory.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/input/pointer_factory.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- pointer_factory.cxx 16 Aug 2002 15:14:00 -0000 1.4
+++ pointer_factory.cxx 22 Aug 2002 00:36:30 -0000 1.5
@@ -56,7 +56,7 @@
PingusError::raise("AxisPointer without speed parameter");
float speed = strtod(speed_str, reinterpret_cast<char**>(NULL));
- free(speed_str);
+ xmlFree(speed_str);
std::vector<Axis*> axes;
cur = cur->children;
Index: scroller_factory.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/input/scroller_factory.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- scroller_factory.cxx 16 Aug 2002 15:14:00 -0000 1.5
+++ scroller_factory.cxx 22 Aug 2002 00:36:30 -0000 1.6
@@ -74,7 +74,7 @@
PingusError::raise("AxisScroller without speed parameter");
float speed = strtod(speed_str, reinterpret_cast<char**>(NULL));
- free(speed_str);
+ xmlFree(speed_str);
std::vector<Axis*> axes;
cur = cur->children;
@@ -108,8 +108,8 @@
bool invert_x = strtol(invert_x_str, reinterpret_cast<char**>(NULL), 10);
bool invert_y = strtol(invert_x_str, reinterpret_cast<char**>(NULL), 10);
- free(invert_x_str);
- free(invert_y_str);
+ xmlFree(invert_x_str);
+ xmlFree(invert_y_str);
Scroller* scroller;
cur = XMLhelper::skip_blank(cur->children);
@@ -132,8 +132,8 @@
int id = strtol(id_str, reinterpret_cast<char**>(NULL), 10);
float speed = strtod(speed_str, reinterpret_cast<char**>(NULL));
- free(id_str);
- free(speed_str);
+ xmlFree(id_str);
+ xmlFree(speed_str);
return new JoystickScroller(id, speed);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/input axis_factory.cxx,1.7,1.8 button_factory.cxx,1.6,1.7 pointer_factory.cxx,1.4,1.5 scroller_factory.cxx,1.5,1.6,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/actions bomber.cxx,1.6,1.7
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src Makefile.am,1.89,1.90 algo.cxx,1.2,1.3 console.cxx,1.6,1.7 entrance_data.cxx,1.4,1.5 exit_data.cxx,1.3,1.4 groundpiece_data.cxx,1.5,1.6 liquid.cxx,1.2,1.3 liquid_data.cxx,1.4,1.5 plt_xml.cxx,1.3,1.4 screen_manager.cxx,1.13,1.14 server.cxx,1.9,1.10 sound.cxx,1.4,1.5 sound.hxx,1.4,1.5 sound_real.cxx,1.4,1.5 surface_button.cxx,1.9,1.10 trap_data.cxx,1.4,1.5 world.cxx,1.14,1.15 xml_helper.cxx,1.12,1.13 xml_plf.cxx,1.7,1.8
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/actions bomber.cxx,1.6,1.7
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src Makefile.am,1.89,1.90 algo.cxx,1.2,1.3 console.cxx,1.6,1.7 entrance_data.cxx,1.4,1.5 exit_data.cxx,1.3,1.4 groundpiece_data.cxx,1.5,1.6 liquid.cxx,1.2,1.3 liquid_data.cxx,1.4,1.5 plt_xml.cxx,1.3,1.4 screen_manager.cxx,1.13,1.14 server.cxx,1.9,1.10 sound.cxx,1.4,1.5 sound.hxx,1.4,1.5 sound_real.cxx,1.4,1.5 surface_button.cxx,1.9,1.10 trap_data.cxx,1.4,1.5 world.cxx,1.14,1.15 xml_helper.cxx,1.12,1.13 xml_plf.cxx,1.7,1.8
- Index(es):