ソースを参照

Removing scope_exit, it belongs to a different project

Samuel Jaffe 9 年 前
コミット
d3e80f8528
2 ファイル変更0 行追加30 行削除
  1. 0 4
      util/gameutils.xcodeproj/project.pbxproj
  2. 0 26
      util/scope_exit.hpp

+ 0 - 4
util/gameutils.xcodeproj/project.pbxproj

@@ -7,14 +7,12 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
-		CD3C808B1D6646AC00ACC795 /* scope_exit.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD3AC7281D2C2922002B4BB0 /* scope_exit.hpp */; };
 		CD3C808C1D6646AF00ACC795 /* identity.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD3AC7161D2C0794002B4BB0 /* identity.hpp */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
 		CD3AC7081D2C0726002B4BB0 /* libgameutils.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libgameutils.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
 		CD3AC7161D2C0794002B4BB0 /* identity.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = identity.hpp; sourceTree = "<group>"; };
-		CD3AC7281D2C2922002B4BB0 /* scope_exit.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = scope_exit.hpp; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -48,7 +46,6 @@
 			isa = PBXGroup;
 			children = (
 				CD3AC7161D2C0794002B4BB0 /* identity.hpp */,
-				CD3AC7281D2C2922002B4BB0 /* scope_exit.hpp */,
 			);
 			name = src;
 			sourceTree = "<group>";
@@ -61,7 +58,6 @@
 			buildActionMask = 2147483647;
 			files = (
 				CD3C808C1D6646AF00ACC795 /* identity.hpp in Headers */,
-				CD3C808B1D6646AC00ACC795 /* scope_exit.hpp in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};

+ 0 - 26
util/scope_exit.hpp

@@ -1,26 +0,0 @@
-//
-//  scope_exit.hpp
-//  gameutils
-//
-//  Created by Sam Jaffe on 7/5/16.
-//
-
-#pragma once
-
-#include <functional>
-
-#undef CONCAT2
-#define CONCAT2(A, B) A##B
-#undef CONCAT
-#define CONCAT(A, B) CONCAT2(A, B)
-#define scope(type) scope_##type##_t CONCAT( scope_,CONCAT( type, __LINE__ ) ) = [&]()
-
-class scope_exit_t {
-public:
-  template <typename F>
-  scope_exit_t(F && fun) : _func(fun) {}
-  scope_exit_t(scope_exit_t && other) : _func(std::move(other._func)) {}
-  ~scope_exit_t() { _func(); }
-private:
-  std::function<void()> _func;
-};