From db69dc4c2620c59f78f1bfee669f3a472b993eb7 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sat, 30 May 2009 18:56:35 +0200 Subject: [PATCH] Revert "common.h: slightly reduced memory usage of RevFile" It breaks binary compatibility of file names cache file saved on disk. Status vector is saved on disk as a part of file name caching. Because the reverted patch changes it's type from QVector to QVector we have a different binary data file saved on disk. This breaks released qgit versions that instead rely on the fact that status is a vector of int. To properly handle this we should update also the file cache version number so that previous versions of qgit can detect binary compatibility is broken and recreate the file as new. But IMHO this seems like an overkill for this patch. Signed-off-by: Marco Costalba --- src/common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common.h b/src/common.h index af2e833..49a28c0 100644 --- a/src/common.h +++ b/src/common.h @@ -374,7 +374,7 @@ class RevFile { // When status of all the files is 'modified' then onlyModified is // set, this let us to do some optimization in this common case bool onlyModified; - QVector status; + QVector status; QVector extStatus; // prevent implicit C++ compiler defaults @@ -416,7 +416,7 @@ public: } bool statusCmp(int idx, StatusFlag sf) const { - return ((onlyModified ? MODIFIED : (StatusFlag)status.at(idx)) & sf); + return ((onlyModified ? MODIFIED : status.at(idx)) & sf); } const QString extendedStatus(int idx) const { /* -- 2.11.4.GIT