Skip to content

Commit

Permalink
fix: use const parameter when checking namespace is js keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
ammarahm-ed committed Oct 8, 2024
1 parent 0eb9052 commit 440bac2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test-app/runtime/src/main/cpp/MetadataNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1984,7 +1984,7 @@ void MetadataNode::EnableProfiler(bool enableProfiler) {
s_profilerEnabled = enableProfiler;
}

bool MetadataNode::IsJavascriptKeyword(std::string word) {
bool MetadataNode::IsJavascriptKeyword(const std::string &word) {
static set<string> keywords;

if (keywords.empty()) {
Expand Down
2 changes: 1 addition & 1 deletion test-app/runtime/src/main/cpp/MetadataNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class MetadataNode {

MetadataNode(MetadataTreeNode* treeNode);

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

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

0 comments on commit 440bac2

Please sign in to comment.