Skip to content

Commit

Permalink
Use our own noncopyable in react/
Browse files Browse the repository at this point in the history
Reviewed By: astreet

Differential Revision: D2905195

fb-gh-sync-id: feede5288ef2d5de9dbd9802280e51f8782070ec
shipit-source-id: feede5288ef2d5de9dbd9802280e51f8782070ec
  • Loading branch information
cjhopman authored and facebook-github-bot-5 committed Feb 9, 2016
1 parent 7cda49d commit 48f82e4
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
1 change: 1 addition & 0 deletions ReactAndroid/src/main/jni/react/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ react_library(
'JSModulesUnbundle.h',
'Value.h',
'Platform.h',
'noncopyable.h',
],
compiler_flags = [
'-Wall',
Expand Down
3 changes: 2 additions & 1 deletion ReactAndroid/src/main/jni/react/JSModulesUnbundle.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
#pragma once

#include <cstdint>
#include <fb/noncopyable.h>
#include <string>
#include <stdexcept>

#include "noncopyable.h"

namespace facebook {
namespace react {

Expand Down
4 changes: 3 additions & 1 deletion ReactAndroid/src/main/jni/react/Value.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
#include <JavaScriptCore/JSRetainPtr.h>
#include <JavaScriptCore/JSStringRef.h>
#include <JavaScriptCore/JSValueRef.h>
#include <fb/noncopyable.h>

#include "noncopyable.h"

#if WITH_FBJSCEXTENSIONS
#include <jsc_stringref.h>
#endif
Expand Down
12 changes: 12 additions & 0 deletions ReactAndroid/src/main/jni/react/noncopyable.h
Original file line number Diff line number Diff line change
@@ -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;
};
}}

0 comments on commit 48f82e4

Please sign in to comment.