Skip to content

Commit 440bac2

Browse files
committed
fix: use const parameter when checking namespace is js keyword
1 parent 0eb9052 commit 440bac2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test-app/runtime/src/main/cpp/MetadataNode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1984,7 +1984,7 @@ void MetadataNode::EnableProfiler(bool enableProfiler) {
19841984
s_profilerEnabled = enableProfiler;
19851985
}
19861986

1987-
bool MetadataNode::IsJavascriptKeyword(std::string word) {
1987+
bool MetadataNode::IsJavascriptKeyword(const std::string &word) {
19881988
static set<string> keywords;
19891989

19901990
if (keywords.empty()) {

test-app/runtime/src/main/cpp/MetadataNode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class MetadataNode {
7676

7777
MetadataNode(MetadataTreeNode* treeNode);
7878

79-
static bool IsJavascriptKeyword(std::string word);
79+
static bool IsJavascriptKeyword(const std::string &word);
8080
v8::Local<v8::Object> CreatePackageObject(v8::Isolate* isolate);
8181

8282
v8::Local<v8::Function> GetConstructorFunction(v8::Isolate* isolate);

0 commit comments

Comments
 (0)