Don't clear complex objects using memset()
This is fine for simple structs but not class based objects.
This commit is contained in:
committed by
Lauri Kasanen
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() {
|
||||
|
||||
Reference in New Issue
Block a user