From 35a7d4629a0803b6219bc08d36ae80ca01e00075 Mon Sep 17 00:00:00 2001 From: Shylie Date: Sat, 9 Mar 2024 09:47:47 -0500 Subject: [PATCH] Simplify terml_get function --- include/terml.h | 2 +- source/terml.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/terml.h b/include/terml.h index 973fdd6..d405168 100644 --- a/include/terml.h +++ b/include/terml.h @@ -27,7 +27,7 @@ int terml_deinit(); unsigned int terml_get_width(); unsigned int terml_get_height(); -int terml_get(unsigned int x, unsigned int y, const tcell** cell); +int terml_get(unsigned int x, unsigned int y, tcell* cell); int terml_set(unsigned int x, unsigned int y, tcell cell); void terml_flush(); diff --git a/source/terml.cpp b/source/terml.cpp index af4b808..e0c4122 100644 --- a/source/terml.cpp +++ b/source/terml.cpp @@ -319,7 +319,7 @@ extern "C" return TERML_G->get_height(); } - int terml_get(unsigned int x, unsigned int y, const tcell** cell) + int terml_get(unsigned int x, unsigned int y, tcell* cell) { if (x >= TERML_G->get_width() || y >= TERML_G->get_height()) { @@ -333,7 +333,7 @@ extern "C" } else { - *cell = &TERML_G->get(x, y); + *cell = TERML_G->get(x, y); return 0; } }