Skip to content

Commit

Permalink
Add const modifier
Browse files Browse the repository at this point in the history
  • Loading branch information
tomekzaw committed Oct 9, 2024
1 parent 2d28192 commit a913bd0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions android/src/main/cpp/MarkdownUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ namespace livemarkdown {
jni::alias_ref<jhybridobject> jThis,
jni::alias_ref<jni::JString> input,
int parserId) {
auto markdownRuntime = expensify::livemarkdown::getMarkdownRuntime();
const auto markdownRuntime = expensify::livemarkdown::getMarkdownRuntime();
jsi::Runtime &rt = markdownRuntime->getJSIRuntime();

auto markdownWorklet = expensify::livemarkdown::getMarkdownWorklet(parserId);
const auto markdownWorklet = expensify::livemarkdown::getMarkdownWorklet(parserId);

auto text = jsi::String::createFromUtf8(rt, input->toStdString());
auto result = markdownRuntime->runGuarded(markdownWorklet, text);
const auto text = jsi::String::createFromUtf8(rt, input->toStdString());
const auto result = markdownRuntime->runGuarded(markdownWorklet, text);

auto json = rt.global().getPropertyAsObject(rt, "JSON").getPropertyAsFunction(rt, "stringify").call(rt, result).asString(rt).utf8(rt);
const auto json = rt.global().getPropertyAsObject(rt, "JSON").getPropertyAsFunction(rt, "stringify").call(rt, result).asString(rt).utf8(rt);
return jni::make_jstring(json);
}

Expand Down

0 comments on commit a913bd0

Please sign in to comment.