Skip to content
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 creation of unnecessary temporary #806

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/easylogging++.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1901,7 +1901,7 @@ Logger* RegisteredLoggers::get(const std::string& id, bool forceCreation) {
logger_->m_logBuilder = m_defaultLogBuilder;
registerNew(id, logger_);
LoggerRegistrationCallback* callback = nullptr;
for (const std::pair<std::string, base::type::LoggerRegistrationCallbackPtr>& h
for (const std::pair<const std::string, base::type::LoggerRegistrationCallbackPtr>& h
: m_loggerRegistrationCallbacks) {
callback = h.second.get();
if (callback != nullptr && callback->enabled()) {
Expand Down Expand Up @@ -2493,7 +2493,7 @@ void LogDispatcher::dispatch(void) {
}
LogDispatchCallback* callback = nullptr;
LogDispatchData data;
for (const std::pair<std::string, base::type::LogDispatchCallbackPtr>& h
for (const std::pair<const std::string, base::type::LogDispatchCallbackPtr>& h
: ELPP->m_logDispatchCallbacks) {
callback = h.second.get();
if (callback != nullptr && callback->enabled()) {
Expand Down Expand Up @@ -2705,7 +2705,7 @@ PerformanceTracker::~PerformanceTracker(void) {
data.init(this);
data.m_formattedTimeTaken = formattedTime;
PerformanceTrackingCallback* callback = nullptr;
for (const std::pair<std::string, base::type::PerformanceTrackingCallbackPtr>& h
for (const std::pair<const std::string, base::type::PerformanceTrackingCallbackPtr>& h
: ELPP->m_performanceTrackingCallbacks) {
callback = h.second.get();
if (callback != nullptr && callback->enabled()) {
Expand Down