From 81811964c32fac1712b25268801c7ae7fd9febb2 Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Thu, 12 Jul 2012 20:54:08 -0700 Subject: [PATCH] Improving UnsavedFile operator== --- cpp/ycm/ClangCompleter.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cpp/ycm/ClangCompleter.h b/cpp/ycm/ClangCompleter.h index 983b89f1..2a5a4374 100644 --- a/cpp/ycm/ClangCompleter.h +++ b/cpp/ycm/ClangCompleter.h @@ -43,9 +43,12 @@ struct UnsavedFile // methods. I have no clue why, but it won't compile without it. // TODO: report this problem on the Boost bug tracker, the default equality // operator should be more than adequate here - bool operator==( const UnsavedFile &other) const + bool operator== ( const UnsavedFile &other ) const { - return filename_ == other.filename_ && contents_ == other.contents_; + return + filename_ == other.filename_ && + contents_ == other.contents_ && + length_ == other.length_; } };