mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-26 17:41:58 +00:00
Remove unused variables
This commit is contained in:
parent
22bb89fca1
commit
ba973ba1bf
@ -328,6 +328,7 @@ void CompletionParseMain(ClangCompleteManager* completion_manager) {
|
|||||||
// tu_last_parsed_at is only read by this thread, so it doesn't need to be under the mutex.
|
// tu_last_parsed_at is only read by this thread, so it doesn't need to be under the mutex.
|
||||||
session->tu_last_parsed_at = std::chrono::high_resolution_clock::now();
|
session->tu_last_parsed_at = std::chrono::high_resolution_clock::now();
|
||||||
std::lock_guard<std::mutex> lock(session->tu_lock);
|
std::lock_guard<std::mutex> lock(session->tu_lock);
|
||||||
|
std::cerr << "[completion] Swapping completion session for " << request.path << std::endl;
|
||||||
session->tu = std::move(parsing);
|
session->tu = std::move(parsing);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -349,9 +350,7 @@ void CompletionDiagnosticsDelayedRefreshMain(ClangCompleteManager* completion_ma
|
|||||||
// Get completion request info.
|
// Get completion request info.
|
||||||
if (!l.owns_lock())
|
if (!l.owns_lock())
|
||||||
l.lock();
|
l.lock();
|
||||||
auto time = *completion_manager->delayed_diagnostic_last_completion_time_;
|
|
||||||
lsTextDocumentPositionParams location = *completion_manager->delayed_diagnostic_last_completion_position_;
|
lsTextDocumentPositionParams location = *completion_manager->delayed_diagnostic_last_completion_position_;
|
||||||
completion_manager->delayed_diagnostic_last_completion_time_.reset();
|
|
||||||
completion_manager->delayed_diagnostic_last_completion_position_.reset();
|
completion_manager->delayed_diagnostic_last_completion_position_.reset();
|
||||||
l.unlock();
|
l.unlock();
|
||||||
|
|
||||||
@ -472,7 +471,6 @@ void CompletionQueryMain(ClangCompleteManager* completion_manager) {
|
|||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lock(completion_manager->delayed_diagnostic_wakeup_mtx_);
|
std::lock_guard<std::mutex> lock(completion_manager->delayed_diagnostic_wakeup_mtx_);
|
||||||
completion_manager->delayed_diagnostic_last_completion_position_ = request->location;
|
completion_manager->delayed_diagnostic_last_completion_position_ = request->location;
|
||||||
completion_manager->delayed_diagnostic_last_completion_time_ = std::chrono::high_resolution_clock::now();
|
|
||||||
}
|
}
|
||||||
completion_manager->delayed_diagnostic_wakeup_cv_.notify_one();
|
completion_manager->delayed_diagnostic_wakeup_cv_.notify_one();
|
||||||
}
|
}
|
||||||
|
@ -109,5 +109,4 @@ struct ClangCompleteManager {
|
|||||||
std::condition_variable delayed_diagnostic_wakeup_cv_;
|
std::condition_variable delayed_diagnostic_wakeup_cv_;
|
||||||
// Access under |delayed_diagnostic_wakeup_mtx_|.
|
// Access under |delayed_diagnostic_wakeup_mtx_|.
|
||||||
optional<lsTextDocumentPositionParams> delayed_diagnostic_last_completion_position_;
|
optional<lsTextDocumentPositionParams> delayed_diagnostic_last_completion_position_;
|
||||||
optional<std::chrono::time_point<std::chrono::high_resolution_clock>> delayed_diagnostic_last_completion_time_;
|
|
||||||
};
|
};
|
||||||
|
@ -1035,8 +1035,6 @@ bool IndexMain_DoCreateIndexUpdate(
|
|||||||
#define PRINT_SECTION(name) \
|
#define PRINT_SECTION(name) \
|
||||||
if (response->perf.name) {\
|
if (response->perf.name) {\
|
||||||
total += response->perf.name; \
|
total += response->perf.name; \
|
||||||
long long milliseconds = response->perf.name / 1000; \
|
|
||||||
long long remaining = response->perf.name - milliseconds; \
|
|
||||||
output << " " << #name << ": " << FormatMicroseconds(response->perf.name); \
|
output << " " << #name << ": " << FormatMicroseconds(response->perf.name); \
|
||||||
}
|
}
|
||||||
std::stringstream output;
|
std::stringstream output;
|
||||||
|
Loading…
Reference in New Issue
Block a user