mirror of
https://github.com/MaskRay/ccls.git
synced 2025-01-31 09:50:26 +00:00
more serializer fixes
This commit is contained in:
parent
4e2f24ac17
commit
9b89bfc905
@ -365,7 +365,7 @@ struct FuncDefDefinitionData {
|
||||
std::vector<FuncRef> callees;
|
||||
|
||||
FuncDefDefinitionData(const std::string& usr) : usr(usr) {
|
||||
assert(usr.size() > 0);
|
||||
//assert(usr.size() > 0);
|
||||
}
|
||||
|
||||
bool operator==(const FuncDefDefinitionData<TypeId, FuncId, VarId, FuncRef, Location>& other) const {
|
||||
@ -409,7 +409,7 @@ struct IndexedFuncDef {
|
||||
IndexedFuncDef() : def("") {} // For serialization
|
||||
|
||||
IndexedFuncDef(FuncId id, const std::string& usr) : id(id), def(usr) {
|
||||
assert(usr.size() > 0);
|
||||
//assert(usr.size() > 0);
|
||||
}
|
||||
|
||||
bool operator<(const IndexedFuncDef& other) const {
|
||||
@ -471,7 +471,7 @@ struct IndexedVarDef {
|
||||
IndexedVarDef() : def("") {} // For serialization
|
||||
|
||||
IndexedVarDef(VarId id, const std::string& usr) : id(id), def(usr) {
|
||||
assert(usr.size() > 0);
|
||||
//assert(usr.size() > 0);
|
||||
}
|
||||
|
||||
bool operator<(const IndexedVarDef& other) const {
|
||||
|
@ -122,7 +122,7 @@ void Reflect(Reader& visitor, std::vector<T>& values) {
|
||||
}
|
||||
}
|
||||
template<typename T>
|
||||
void Reflect(Reader& visitor, optional<T> value) {
|
||||
void Reflect(Reader& visitor, optional<T>& value) {
|
||||
T real_value;
|
||||
Reflect(visitor, real_value);
|
||||
value = real_value;
|
||||
|
2
test.cc
2
test.cc
@ -74,8 +74,6 @@ void DiffDocuments(rapidjson::Document& expected, rapidjson::Document& actual) {
|
||||
}
|
||||
|
||||
void VerifySerializeToFrom(IndexedFile& file) {
|
||||
return; // TODO
|
||||
|
||||
std::string expected = file.ToString();
|
||||
std::string actual = Deserialize("foo.cc", Serialize(file)).ToString();
|
||||
if (expected != actual) {
|
||||
|
Loading…
Reference in New Issue
Block a user