Skip to content

Commit

Permalink
Merge pull request #712 from KrusnikViers/remove-unused-variable
Browse files Browse the repository at this point in the history
Comment unused variable
  • Loading branch information
abumq authored Dec 25, 2020
2 parents 9532481 + 438c34c commit d3e56c0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/easylogging++.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2184,16 +2184,18 @@ void Storage::setApplicationArguments(int argc, char** argv) {
} // namespace base

// LogDispatchCallback
void LogDispatchCallback::handle(const LogDispatchData* data) {
#if defined(ELPP_THREAD_SAFE)
void LogDispatchCallback::handle(const LogDispatchData* data) {
base::threading::ScopedLock scopedLock(m_fileLocksMapLock);
std::string filename = data->logMessage()->logger()->typedConfigurations()->filename(data->logMessage()->level());
auto lock = m_fileLocks.find(filename);
if (lock == m_fileLocks.end()) {
m_fileLocks.emplace(std::make_pair(filename, std::unique_ptr<base::threading::Mutex>(new base::threading::Mutex)));
}
#endif
}
#else
void LogDispatchCallback::handle(const LogDispatchData* /*data*/) {}
#endif

base::threading::Mutex& LogDispatchCallback::fileHandle(const LogDispatchData* data) {
auto it = m_fileLocks.find(data->logMessage()->logger()->typedConfigurations()->filename(data->logMessage()->level()));
Expand Down

0 comments on commit d3e56c0

Please sign in to comment.