Skip to content

Commit

Permalink
Dropped using namespace from TurboModuleUtils.h
Browse files Browse the repository at this point in the history
Summary:
using namespace in header file is a bad practice due to many reasons as well as discouraged by `-Wheader-hygiene` compiler flag which is default for many apps

https://stackoverflow.com/questions/5849457/using-namespace-in-c-headers

Changelog:
[General][Fixed] - Fixed compilation warning due to `using namespace` being used as part of header

Reviewed By: nlutsenko

Differential Revision: D34788523

fbshipit-source-id: 2a50fbf2ac3371ff5670c600c7f5ad9055060ad2
  • Loading branch information
arhelmus authored and facebook-github-bot committed Mar 11, 2022
1 parent 2a5265d commit 009d80b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
#include "TurboModuleManager.h"

void jniEnableCppLogging(
jni::alias_ref<jclass> cls,
jni::alias_ref<facebook::react::JNativeModulePerfLogger::javaobject>
perfLogger) {
facebook::jni::alias_ref<jclass> cls,
facebook::jni::alias_ref<
facebook::react::JNativeModulePerfLogger::javaobject> perfLogger) {
facebook::react::TurboModulePerfLogger::enableLogging(
perfLogger->cthis()->get());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
#include <ReactCommon/CallInvoker.h>
#include <ReactCommon/LongLivedObject.h>

using namespace facebook;

namespace facebook {
namespace react {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#import <ReactCommon/TurboModulePerfLogger.h>
#import <ReactCommon/TurboModuleUtils.h>

using namespace facebook;
using namespace facebook::react;

static int32_t getUniqueId()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#import <ReactCommon/TurboModuleBinding.h>
#import <ReactCommon/TurboModulePerfLogger.h>

using namespace facebook;
using namespace facebook::react;

/**
Expand Down

0 comments on commit 009d80b

Please sign in to comment.