OSDN Git Service

Merge with stable
[winmerge-jp/winmerge-jp.git] / Src / DiffItem.h
index 9baf027..3b6a685 100644 (file)
@@ -93,7 +93,25 @@ public:
        bool isSideAll() const { return CheckSide(diffcode, DIFFCODE::ALL); }
        void setSideAll() { SetSide(DIFFCODE::ALL); }
        void setSideNone() { SetSide(0); }
-       bool isSide(int nIndex) const
+       void setSideFlag(int nIndex)
+       {
+               switch (nIndex)
+               {
+               case 0: SetSide(diffcode | DIFFCODE::FIRST); return;
+               case 1: SetSide(diffcode | DIFFCODE::SECOND); return;
+               case 2: SetSide(diffcode | DIFFCODE::THIRD); return;
+               }
+       }
+       void unsetSideFlag(int nIndex)
+       {
+               switch (nIndex)
+               {
+               case 0: SetSide(diffcode & ~DIFFCODE::FIRST); return;
+               case 1: SetSide(diffcode & ~DIFFCODE::SECOND); return;
+               case 2: SetSide(diffcode & ~DIFFCODE::THIRD); return;
+               }
+       }
+       bool isSideOnly(int nIndex) const
        {
                switch (nIndex)
                {