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

Merge pull request #1853 from Nordsoft91/fix-scope-guard

Fix ScopeGuard move behavior
Ivan Savenko 2 жил өмнө
parent
commit
c5ca17a324
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();
 		}
 	};