mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2025-02-16 10:29:19 +01: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_)
|
||||
: bitmap(0), window(window_), device(0) {
|
||||
memset(&format, 0, sizeof(format));
|
||||
}
|
||||
|
||||
DIBSectionBuffer::DIBSectionBuffer(HDC device_)
|
||||
: bitmap(0), window(0), device(device_) {
|
||||
memset(&format, 0, sizeof(format));
|
||||
}
|
||||
|
||||
DIBSectionBuffer::~DIBSectionBuffer() {
|
||||
|
@ -36,7 +36,7 @@ using namespace win32;
|
||||
static LogWriter vlog("MonitorInfo");
|
||||
|
||||
|
||||
static void fillMonitorInfo(HMONITOR monitor, MonitorInfo* mi) {
|
||||
static void fillMonitorInfo(HMONITOR monitor, MONITORINFOEXA* mi) {
|
||||
vlog.debug("monitor=%p", monitor);
|
||||
memset(mi, 0, sizeof(MONITORINFOEXA));
|
||||
mi->cbSize = sizeof(MONITORINFOEXA);
|
||||
@ -70,7 +70,7 @@ MonitorInfo::MonitorInfo(const RECT& r) {
|
||||
|
||||
|
||||
struct monitorByNameData {
|
||||
MonitorInfo* info;
|
||||
MONITORINFOEXA* info;
|
||||
const char* monitorName;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user