-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix compiler warnings #53
base: streamlabs
Are you sure you want to change the base?
Conversation
Type issues, variable initialization, and can't std::move a const
@@ -157,15 +157,16 @@ std::vector<ipc::value> ipc::client_win::call_synchronous_helper(const std::stri | |||
const auto total_time = (std::chrono::high_resolution_clock::now() - cd.start); | |||
if (!freeze_flagged && total_time > freeze_timeout) { | |||
freeze_flagged = true; | |||
m_freeze_cb(m_app_state_path, cname + "::" + fname, std::chrono::duration_cast<std::chrono::milliseconds>(total_time).count(), -1); | |||
int64_t ms = std::chrono::duration_cast<std::chrono::milliseconds>(total_time).count(); | |||
m_freeze_cb(m_app_state_path, cname + "::" + fname, static_cast<int>(ms), -1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Trivial) I realize this is legacy code but this code is likely creating temporary strings? maybe we could consider like this in the future but perhaps this alternative is less readable I admit.
cname.append("::").append(fname)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good too me
Type issues, variable initialization, and can't std::move a const