DiffEditor: Use DiffSide enum inside ChunkSelection

Change-Id: If23b0f46856eebec96624e58b6ad90b1b3e8be23
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Jarek Kobus
2022-09-26 15:08:59 +02:00
parent a1c4d563a1
commit 6dc412e255
3 changed files with 7 additions and 7 deletions

View File

@@ -5,6 +5,7 @@
#include "diffeditor_global.h"
#include <utils/algorithm.h>
#include <utils/filepath.h>
#include <QMap>
@@ -83,11 +84,10 @@ class DIFFEDITOR_EXPORT ChunkSelection {
public:
ChunkSelection() = default;
ChunkSelection(const QList<int> &left, const QList<int> &right)
: leftSelection(left), rightSelection(right) {}
bool isNull() const { return leftSelection.isEmpty() && rightSelection.isEmpty(); }
: selection({left, right}) {}
bool isNull() const { return Utils::allOf(selection, &QList<int>::isEmpty); }
int selectedRowsCount() const;
QList<int> leftSelection;
QList<int> rightSelection;
std::array<QList<int>, SideCount> selection{};
};
class DIFFEDITOR_EXPORT FileData {