mirror of
https://github.com/tihmstar/futurerestore.git
synced 2025-01-04 19:45:31 +00:00
stuff
This commit is contained in:
parent
75edbc31a6
commit
2bc7dd6071
2
Makefile
2
Makefile
|
@ -4,7 +4,7 @@ CXX = g++
|
||||||
CC = gcc
|
CC = gcc
|
||||||
INCLUDE += -I futurerestore -I /opt/local/include -I external/idevicerestore/src -I external/tsschecker/tsschecker -I external/img4tool/img4tool
|
INCLUDE += -I futurerestore -I /opt/local/include -I external/idevicerestore/src -I external/tsschecker/tsschecker -I external/img4tool/img4tool
|
||||||
CFLAGS += $(INCLUDE) -Wall -std=c11 -D HAVE_CONFIG_H=1
|
CFLAGS += $(INCLUDE) -Wall -std=c11 -D HAVE_CONFIG_H=1
|
||||||
CXXFLAGS += $(INCLUDE) -Wall -std=c++11
|
CXXFLAGS += $(INCLUDE) -Wall -std=c++11 -stdlib=libc++
|
||||||
|
|
||||||
LDFLAGS += -lirecovery -limobiledevice -lcrypto -lcurl -lplist -lc -lc++ -lzip -lpartialzip-1.0 -lz
|
LDFLAGS += -lirecovery -limobiledevice -lcrypto -lcurl -lplist -lc -lc++ -lzip -lpartialzip-1.0 -lz
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <functional>
|
||||||
#include "idevicerestore.h"
|
#include "idevicerestore.h"
|
||||||
#include "jsmn.h"
|
#include "jsmn.h"
|
||||||
|
|
||||||
|
@ -18,7 +19,7 @@ using namespace std;
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class ptr_smart {
|
class ptr_smart {
|
||||||
function<void(T)> _ptr_free = NULL;
|
std::function<void(T)> _ptr_free = NULL;
|
||||||
public:
|
public:
|
||||||
T _p;
|
T _p;
|
||||||
ptr_smart(T p, function<void(T)> ptr_free){static_assert(is_pointer<T>(), "error: this is for pointers only\n"); _p = p;_ptr_free = ptr_free;}
|
ptr_smart(T p, function<void(T)> ptr_free){static_assert(is_pointer<T>(), "error: this is for pointers only\n"); _p = p;_ptr_free = ptr_free;}
|
||||||
|
|
Loading…
Reference in a new issue