Skip to content

Commit e979b0e

Browse files
etodanikmeta-codesync[bot]
authored andcommitted
remove backticks in NativeDOM.cpp (#57573)
Summary: MSVC is highly allergic to backticks in #pragma and will panic with error C2018: unknown character '0x60' I'm currently preparing my React Native for Unreal Engine OOT platform, and as part of that I'm compiling with MSVC. MSVC doesn't tolerate the backticks here. ## Changelog: [GENERAL] [FIXED] - fixed MSVC compilation of NativeDOM.cpp by removing backticks Pull Request resolved: #57573 Test Plan: Check that MSVC no longer complains about backticks Reviewed By: cortinico Differential Revision: D112348262 Pulled By: christophpurrer fbshipit-source-id: 060c357b2f1a642129e56226fa7125622ed0d99e
1 parent 9f7af3e commit e979b0e

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

  • packages/react-native/ReactCommon/react/nativemodule/dom

packages/react-native/ReactCommon/react/nativemodule/dom/NativeDOM.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ bool isRootShadowNode(const ShadowNode& shadowNode) {
9292
NativeDOM::NativeDOM(std::shared_ptr<CallInvoker> jsInvoker)
9393
: NativeDOMCxxSpec(std::move(jsInvoker)) {}
9494

95-
#pragma mark - Methods from the `Node` interface (for `ReadOnlyNode`).
95+
#pragma mark - Methods from the Node interface (for ReadOnlyNode).
9696

9797
double NativeDOM::compareDocumentPosition(
9898
jsi::Runtime& rt,
@@ -119,7 +119,7 @@ double NativeDOM::compareDocumentPosition(
119119

120120
if (isRootShadowNode(*otherShadowNode)) {
121121
// If the other is a root node, we just need to check if it is its
122-
// `documentElement`
122+
// documentElement
123123
return (surfaceId == otherShadowNode->getSurfaceId())
124124
? dom::DOCUMENT_POSITION_CONTAINED_BY |
125125
dom::DOCUMENT_POSITION_FOLLOWING
@@ -232,7 +232,7 @@ bool NativeDOM::isConnected(jsi::Runtime& rt, jsi::Value nativeNodeReference) {
232232
return dom::isConnected(currentRevision, *shadowNode);
233233
}
234234

235-
#pragma mark - Methods from the `Element` interface (for `ReactNativeElement`).
235+
#pragma mark - Methods from the Element interface (for ReactNativeElement).
236236

237237
std::tuple<
238238
/* topWidth: */ int,
@@ -358,7 +358,7 @@ void NativeDOM::setPointerCapture(
358358
static_cast<PointerIdentifier>(pointerId), shadowNode);
359359
}
360360

361-
#pragma mark - Methods from the `HTMLElement` interface (for `ReactNativeElement`).
361+
#pragma mark - Methods from the HTMLElement interface (for ReactNativeElement).
362362

363363
std::tuple<
364364
/* offsetParent: */ jsi::Value,
@@ -401,7 +401,7 @@ jsi::Value NativeDOM::linkRootNode(
401401
return Bridging<std::shared_ptr<const ShadowNode>>::toJs(rt, currentRevision);
402402
}
403403

404-
#pragma mark - Legacy layout APIs (for `ReactNativeElement`).
404+
#pragma mark - Legacy layout APIs (for ReactNativeElement).
405405

406406
void NativeDOM::measure(
407407
jsi::Runtime& rt,
@@ -466,7 +466,7 @@ void NativeDOM::measureLayout(
466466
onSuccess(rect.x, rect.y, rect.width, rect.height);
467467
}
468468

469-
#pragma mark - Legacy direct manipulation APIs (for `ReactNativeElement`).
469+
#pragma mark - Legacy direct manipulation APIs (for ReactNativeElement).
470470

471471
void NativeDOM::setNativeProps(
472472
jsi::Runtime& rt,

0 commit comments

Comments
 (0)