mirror of
https://github.com/royshil/obs-localvocal.git
synced 2026-01-10 04:48:02 -05:00
Change recently added catch blocks to use const references
It's been a while since I've done much C++ v.v
This commit is contained in:
@@ -665,7 +665,7 @@ void recording_state_callback(enum obs_frontend_event event, void *data)
|
||||
newPath = recordingPath.parent_path() / newPath.filename();
|
||||
|
||||
fs::rename(outputPath, newPath);
|
||||
} catch (std::filesystem::filesystem_error e) {
|
||||
} catch (const std::filesystem::filesystem_error &e) {
|
||||
obs_log(LOG_ERROR, "Error renaming output file - %s", e.what());
|
||||
}
|
||||
} else if (event == OBS_FRONTEND_EVENT_STREAMING_STARTING) {
|
||||
|
||||
@@ -321,7 +321,7 @@ void VadIterator::process(const std::vector<float> &input_wav, bool reset_state)
|
||||
triggered = false;
|
||||
}
|
||||
}
|
||||
catch (Ort::Exception e) {
|
||||
catch (const Ort::Exception &e) {
|
||||
obs_log(LOG_ERROR, "Caught exception when running VAD prediction. Error code: %s, message: %s",
|
||||
ort_error_code_str(e.GetOrtErrorCode()), e.what());
|
||||
}
|
||||
@@ -333,7 +333,7 @@ void VadIterator::process(const std::vector<float> &input_wav, std::vector<float
|
||||
process(input_wav);
|
||||
collect_chunks(input_wav, output_wav);
|
||||
}
|
||||
catch (Ort::Exception e) {
|
||||
catch (const Ort::Exception &e) {
|
||||
obs_log(LOG_ERROR, "Caught exception when running VAD prediction. Error code: %s, message: %s",
|
||||
ort_error_code_str(e.GetOrtErrorCode()), e.what());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user