aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/TightDecoder.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2023-01-09 19:01:35 +0100
committerPierre Ossman <ossman@cendio.se>2023-02-01 21:17:12 +0100
commitd98720b736eb908d63c1ecb3779fc2a3cd9f4914 (patch)
tree4d548eba62bcabe0892054d547b157ba1178249f /common/rfb/TightDecoder.cxx
parent6881c895ab317bd302addac5f228b7367136017f (diff)
downloadtigervnc-d98720b736eb908d63c1ecb3779fc2a3cd9f4914.tar.gz
tigervnc-d98720b736eb908d63c1ecb3779fc2a3cd9f4914.zip
Use std::vector for basic data arrays
Avoid our own custom types in favour of what's already included with C++.
Diffstat (limited to 'common/rfb/TightDecoder.cxx')
-rw-r--r--common/rfb/TightDecoder.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/common/rfb/TightDecoder.cxx b/common/rfb/TightDecoder.cxx
index 65c7191a..09c253bd 100644
--- a/common/rfb/TightDecoder.cxx
+++ b/common/rfb/TightDecoder.cxx
@@ -25,10 +25,11 @@
#include <assert.h>
+#include <vector>
+
#include <rdr/InStream.h>
#include <rdr/MemInStream.h>
#include <rdr/OutStream.h>
-#include <rdr/types.h>
#include <rfb/ServerParams.h>
#include <rfb/Exception.h>
@@ -309,15 +310,15 @@ void TightDecoder::decodeRect(const Rect& r, const void* buffer,
if (pf.is888()) {
size_t len = palSize * 3;
- rdr::U8Array tightPalette(len);
+ std::vector<uint8_t> tightPalette(len);
assert(buflen >= len);
- memcpy(tightPalette.buf, bufptr, len);
+ memcpy(tightPalette.data(), bufptr, len);
bufptr += len;
buflen -= len;
- pf.bufferFromRGB(palette, tightPalette.buf, palSize);
+ pf.bufferFromRGB(palette, tightPalette.data(), palSize);
} else {
size_t len;