mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2025-06-24 19:51:23 +02:00
Don't clear complex objects using memset()
This is fine for simple structs but not class based objects.
This commit is contained in:
parent
e2cea31e87
commit
27d6677a31
@ -30,12 +30,10 @@ static LogWriter vlog("DIBSectionBuffer");
|
|||||||
|
|
||||||
DIBSectionBuffer::DIBSectionBuffer(HWND window_)
|
DIBSectionBuffer::DIBSectionBuffer(HWND window_)
|
||||||
: bitmap(0), window(window_), device(0) {
|
: bitmap(0), window(window_), device(0) {
|
||||||
memset(&format, 0, sizeof(format));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DIBSectionBuffer::DIBSectionBuffer(HDC device_)
|
DIBSectionBuffer::DIBSectionBuffer(HDC device_)
|
||||||
: bitmap(0), window(0), device(device_) {
|
: bitmap(0), window(0), device(device_) {
|
||||||
memset(&format, 0, sizeof(format));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DIBSectionBuffer::~DIBSectionBuffer() {
|
DIBSectionBuffer::~DIBSectionBuffer() {
|
||||||
|
@ -36,7 +36,7 @@ using namespace win32;
|
|||||||
static LogWriter vlog("MonitorInfo");
|
static LogWriter vlog("MonitorInfo");
|
||||||
|
|
||||||
|
|
||||||
static void fillMonitorInfo(HMONITOR monitor, MonitorInfo* mi) {
|
static void fillMonitorInfo(HMONITOR monitor, MONITORINFOEXA* mi) {
|
||||||
vlog.debug("monitor=%p", monitor);
|
vlog.debug("monitor=%p", monitor);
|
||||||
memset(mi, 0, sizeof(MONITORINFOEXA));
|
memset(mi, 0, sizeof(MONITORINFOEXA));
|
||||||
mi->cbSize = sizeof(MONITORINFOEXA);
|
mi->cbSize = sizeof(MONITORINFOEXA);
|
||||||
@ -70,7 +70,7 @@ MonitorInfo::MonitorInfo(const RECT& r) {
|
|||||||
|
|
||||||
|
|
||||||
struct monitorByNameData {
|
struct monitorByNameData {
|
||||||
MonitorInfo* info;
|
MONITORINFOEXA* info;
|
||||||
const char* monitorName;
|
const char* monitorName;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user