2
0
Эх сурвалжийг харах

Fix ScopeGuard move behavior

nordsoft 2 жил өмнө
parent
commit
91ef7cbb4f
1 өөрчлөгдсөн 2 нэмэгдсэн , 1 устгасан
  1. 2 1
      lib/ScopeGuard.h

+ 2 - 1
lib/ScopeGuard.h

@@ -37,7 +37,8 @@ namespace vstd
 		{}
 		~ScopeGuard()
 		{
-			f();
+			if(fire)
+				f();
 		}
 	};