summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/input_default.cpp6
-rw-r--r--main/tests/test_gdscript.cpp4
-rw-r--r--main/tests/test_io.cpp2
-rw-r--r--main/tests/test_math.cpp4
-rw-r--r--main/tests/test_physics.cpp4
5 files changed, 10 insertions, 10 deletions
diff --git a/main/input_default.cpp b/main/input_default.cpp
index 29d30110e3..4363fc1c88 100644
--- a/main/input_default.cpp
+++ b/main/input_default.cpp
@@ -684,7 +684,7 @@ void InputDefault::joy_button(int p_device, int p_button, bool p_pressed) {
return;
};
- Map<int, JoyEvent>::Element *el = map_db[joy.mapping].buttons.find(p_button);
+ const Map<int, JoyEvent>::Element *el = map_db[joy.mapping].buttons.find(p_button);
if (!el) {
//don't process un-mapped events for now, it could mess things up badly for devices with additional buttons/axis
//return _button_event(p_last_id, p_device, p_button, p_pressed);
@@ -755,7 +755,7 @@ void InputDefault::joy_axis(int p_device, int p_axis, const JoyAxis &p_value) {
return;
};
- Map<int, JoyEvent>::Element *el = map_db[joy.mapping].axis.find(p_axis);
+ const Map<int, JoyEvent>::Element *el = map_db[joy.mapping].axis.find(p_axis);
if (!el) {
//return _axis_event(p_last_id, p_device, p_axis, p_value);
return;
@@ -831,7 +831,7 @@ void InputDefault::joy_hat(int p_device, int p_val) {
_THREAD_SAFE_METHOD_;
const Joypad &joy = joy_names[p_device];
- JoyEvent *map;
+ const JoyEvent *map;
if (joy.mapping == -1) {
map = hat_map_default;
diff --git a/main/tests/test_gdscript.cpp b/main/tests/test_gdscript.cpp
index 5f3a2c1dc8..0a9d03c1b7 100644
--- a/main/tests/test_gdscript.cpp
+++ b/main/tests/test_gdscript.cpp
@@ -924,8 +924,8 @@ MainLoop *test(TestType p_type) {
Vector<uint8_t> buf;
int flen = fa->get_len();
buf.resize(fa->get_len() + 1);
- fa->get_buffer(&buf[0], flen);
- buf[flen] = 0;
+ fa->get_buffer(buf.ptrw(), flen);
+ buf.write[flen] = 0;
String code;
code.parse_utf8((const char *)&buf[0]);
diff --git a/main/tests/test_io.cpp b/main/tests/test_io.cpp
index 08dc374ed1..4f98955995 100644
--- a/main/tests/test_io.cpp
+++ b/main/tests/test_io.cpp
@@ -103,7 +103,7 @@ MainLoop *test() {
int len = z->get_len();
Vector<uint8_t> zip;
zip.resize(len);
- z->get_buffer(&zip[0], len);
+ z->get_buffer(zip.ptrw(), len);
z->close();
memdelete(z);
diff --git a/main/tests/test_math.cpp b/main/tests/test_math.cpp
index 8b71c5dc70..1a72416d6a 100644
--- a/main/tests/test_math.cpp
+++ b/main/tests/test_math.cpp
@@ -503,8 +503,8 @@ MainLoop *test() {
Vector<uint8_t> buf;
int flen = fa->get_len();
buf.resize(fa->get_len() + 1);
- fa->get_buffer(&buf[0], flen);
- buf[flen] = 0;
+ fa->get_buffer(buf.ptrw(), flen);
+ buf.write[flen] = 0;
String code;
code.parse_utf8((const char *)&buf[0]);
diff --git a/main/tests/test_physics.cpp b/main/tests/test_physics.cpp
index 475663dabe..99c8fce70e 100644
--- a/main/tests/test_physics.cpp
+++ b/main/tests/test_physics.cpp
@@ -228,11 +228,11 @@ protected:
for (int i = 0; i < p_width; i++) {
- grid[i].resize(p_height);
+ grid.write[i].resize(p_height);
for (int j = 0; j < p_height; j++) {
- grid[i][j] = 1.0 + Math::random(-p_cellheight, p_cellheight);
+ grid.write[i].write[j] = 1.0 + Math::random(-p_cellheight, p_cellheight);
}
}