aboutsummaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2023-01-17 16:38:59 +0100
committerPierre Ossman <ossman@cendio.se>2023-02-04 14:03:13 +0100
commitadaedc9629c5f4b124a1872bac6a11844b7f576e (patch)
treed6f37a99b42e8e576fd94b0172e4a270f1a56f41 /win
parentb99daadb05e14e85da6c5e905057e10fc27c0fcf (diff)
downloadtigervnc-adaedc9629c5f4b124a1872bac6a11844b7f576e.tar.gz
tigervnc-adaedc9629c5f4b124a1872bac6a11844b7f576e.zip
Use std::string for string memory management
Avoids a bit of complexity by delegating that handling to a string object.
Diffstat (limited to 'win')
-rw-r--r--win/winvnc/ListConnInfo.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/win/winvnc/ListConnInfo.h b/win/winvnc/ListConnInfo.h
index f779cf5d..1926b8a7 100644
--- a/win/winvnc/ListConnInfo.h
+++ b/win/winvnc/ListConnInfo.h
@@ -21,8 +21,7 @@
#define __RFB_LISTCONNINFO_INCLUDED__
#include <list>
-
-#include <rfb/util.h>
+#include <string>
namespace winvnc {
@@ -53,12 +52,12 @@ namespace winvnc {
void addInfo(void* Conn, const char* IP, int Status) {
conn.push_back(Conn);
- IP_address.push_back(rfb::strDup(IP));
+ IP_address.push_back(IP);
status.push_back(Status);
}
void iGetCharInfo(const char* buf[2]) {
- buf[0] = *Ii;
+ buf[0] = Ii->c_str();
switch (*si) {
case 0:
buf[1] = "Full control";
@@ -107,10 +106,10 @@ namespace winvnc {
private:
std::list<void*> conn;
- std::list<char*> IP_address;
+ std::list<std::string> IP_address;
std::list<int> status;
std::list<void*>::iterator ci;
- std::list<char*>::iterator Ii;
+ std::list<std::string>::iterator Ii;
std::list<int>::iterator si;
bool disableClients;
};