aboutsummaryrefslogtreecommitdiffstats
path: root/win/rfb_win32/Dialog.h
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2023-01-13 11:14:21 +0100
committerPierre Ossman <ossman@cendio.se>2023-02-04 14:03:13 +0100
commit5c1ac16776cd9f2a75e31086755e72186b3b3d41 (patch)
tree234a54c7f11c25ba59f8487118d13eb550c1cc64 /win/rfb_win32/Dialog.h
parent1af2a56f7583b301890f8ea213f262782cc3c9f1 (diff)
downloadtigervnc-5c1ac16776cd9f2a75e31086755e72186b3b3d41.tar.gz
tigervnc-5c1ac16776cd9f2a75e31086755e72186b3b3d41.zip
Return static char buffer from some methods
This mimics how some system functions (like inet_ntop()) work, and avoids complexity around ownership of the returned string buffer. The downside is that the string must be consumed directly as it will be overwritten on the next call, but that is not an issue with the current usage.
Diffstat (limited to 'win/rfb_win32/Dialog.h')
-rw-r--r--win/rfb_win32/Dialog.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/win/rfb_win32/Dialog.h b/win/rfb_win32/Dialog.h
index 582aa0d9..f2d718ce 100644
--- a/win/rfb_win32/Dialog.h
+++ b/win/rfb_win32/Dialog.h
@@ -77,7 +77,7 @@ namespace rfb {
// Read the states of items
bool isItemChecked(int id);
int getItemInt(int id);
- char* getItemString(int id); // Recipient owns string storage
+ const char *getItemString(int id);
// Set the states of items
void setItemChecked(int id, bool state);