Browse Source

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

Fix ScopeGuard move behavior
Ivan Savenko 2 năm trước cách đây
mục cha
commit
c5ca17a324
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      lib/ScopeGuard.h

+ 2 - 1
lib/ScopeGuard.h

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