mirror of
https://github.com/status-im/react-native.git
synced 2025-02-28 17:10:50 +00:00
Use our own noncopyable in react/
Reviewed By: astreet Differential Revision: D2905195 fb-gh-sync-id: feede5288ef2d5de9dbd9802280e51f8782070ec shipit-source-id: feede5288ef2d5de9dbd9802280e51f8782070ec
This commit is contained in:
parent
7cda49d516
commit
48f82e4e2b
@ -65,6 +65,7 @@ react_library(
|
|||||||
'JSModulesUnbundle.h',
|
'JSModulesUnbundle.h',
|
||||||
'Value.h',
|
'Value.h',
|
||||||
'Platform.h',
|
'Platform.h',
|
||||||
|
'noncopyable.h',
|
||||||
],
|
],
|
||||||
compiler_flags = [
|
compiler_flags = [
|
||||||
'-Wall',
|
'-Wall',
|
||||||
|
@ -3,10 +3,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <fb/noncopyable.h>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
|
#include "noncopyable.h"
|
||||||
|
|
||||||
namespace facebook {
|
namespace facebook {
|
||||||
namespace react {
|
namespace react {
|
||||||
|
|
||||||
|
@ -8,7 +8,9 @@
|
|||||||
#include <JavaScriptCore/JSRetainPtr.h>
|
#include <JavaScriptCore/JSRetainPtr.h>
|
||||||
#include <JavaScriptCore/JSStringRef.h>
|
#include <JavaScriptCore/JSStringRef.h>
|
||||||
#include <JavaScriptCore/JSValueRef.h>
|
#include <JavaScriptCore/JSValueRef.h>
|
||||||
#include <fb/noncopyable.h>
|
|
||||||
|
#include "noncopyable.h"
|
||||||
|
|
||||||
#if WITH_FBJSCEXTENSIONS
|
#if WITH_FBJSCEXTENSIONS
|
||||||
#include <jsc_stringref.h>
|
#include <jsc_stringref.h>
|
||||||
#endif
|
#endif
|
||||||
|
12
ReactAndroid/src/main/jni/react/noncopyable.h
Normal file
12
ReactAndroid/src/main/jni/react/noncopyable.h
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright 2004-present Facebook. All Rights Reserved.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
namespace facebook {
|
||||||
|
namespace react {
|
||||||
|
struct noncopyable {
|
||||||
|
noncopyable(const noncopyable&) = delete;
|
||||||
|
noncopyable& operator=(const noncopyable&) = delete;
|
||||||
|
protected:
|
||||||
|
noncopyable() = default;
|
||||||
|
};
|
||||||
|
}}
|
Loading…
x
Reference in New Issue
Block a user