Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/shared/AutoHandle.cpp

Issue 10774005: Avoid duplication between AdblockPlus and AdblockPlusEngine (Closed)
Patch Set: Created May 24, 2013, 3:48 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/shared/AutoHandle.cpp
===================================================================
new file mode 100644
--- /dev/null
+++ b/src/shared/AutoHandle.cpp
@@ -0,0 +1,21 @@
+#include PRECOMPILED_HEADER_FILE
+
Oleksandr 2013/05/27 15:32:26 It is usually just #include stdafx.h. No need to u
+#include "AutoHandle.h"
+
+AutoHandle::AutoHandle()
+{
+}
+
+AutoHandle::AutoHandle(HANDLE handle) : handle(handle)
+{
+}
+
+AutoHandle::~AutoHandle()
+{
+ CloseHandle(handle);
+}
+
+HANDLE AutoHandle::get()
Wladimir Palant 2013/05/27 09:51:55 I would rather do this as AutoHandle::operator HAN
Felix Dahlke 2013/06/04 09:50:40 That's actually nicer, will do.
+{
+ return handle;
+}
« src/engine/main.cpp ('K') | « src/shared/AutoHandle.h ('k') | src/shared/Communication.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld