perf: Avoid error message copying

This commit is contained in:
Marc Rousavy 2021-06-28 20:45:08 +02:00
parent 4bacee796a
commit da84a0fd42
2 changed files with 2 additions and 2 deletions

View File

@ -82,7 +82,7 @@ CameraView* FrameProcessorRuntimeManager::findCameraViewById(int viewId) {
return result->cthis(); return result->cthis();
} }
void FrameProcessorRuntimeManager::logErrorToJS(std::string message) { void FrameProcessorRuntimeManager::logErrorToJS(const std::string& message) {
if (!this->jsCallInvoker_) { if (!this->jsCallInvoker_) {
return; return;
} }

View File

@ -53,7 +53,7 @@ class FrameProcessorRuntimeManager : public jni::HybridClass<FrameProcessorRunti
void initializeRuntime(); void initializeRuntime();
void installJSIBindings(); void installJSIBindings();
void registerPlugin(alias_ref<FrameProcessorPlugin::javaobject> plugin); void registerPlugin(alias_ref<FrameProcessorPlugin::javaobject> plugin);
void logErrorToJS(std::string message); void logErrorToJS(const std::string& message);
}; };
} // namespace vision } // namespace vision