mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-26 09:31:59 +00:00
Fix build error on Linux for INT_MIN (#10)
* Fix compiler warnings and turn on warnings as errors * Fix build error on Linux for INT_MIN
This commit is contained in:
parent
8dd751a70f
commit
0876886c60
@ -10,6 +10,7 @@
|
|||||||
#include <doctest/doctest.h>
|
#include <doctest/doctest.h>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <limits>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -385,7 +386,7 @@ Project::Entry Project::FindCompilationEntryForFile(const std::string& filename)
|
|||||||
// We couldn't find the file. Try to infer it.
|
// We couldn't find the file. Try to infer it.
|
||||||
// TODO: Cache inferred file in a separate array (using a lock or similar)
|
// TODO: Cache inferred file in a separate array (using a lock or similar)
|
||||||
Entry* best_entry = nullptr;
|
Entry* best_entry = nullptr;
|
||||||
int best_score = INT_MIN;
|
int best_score = std::numeric_limits<int>::min();
|
||||||
for (Entry& entry : entries) {
|
for (Entry& entry : entries) {
|
||||||
int score = ComputeGuessScore(filename, entry.filename);
|
int score = ComputeGuessScore(filename, entry.filename);
|
||||||
if (score > best_score) {
|
if (score > best_score) {
|
||||||
|
Loading…
Reference in New Issue
Block a user