Commit 43129a29 authored by Christian Kamm's avatar Christian Kamm
Browse files

Quickfix: Add flip helpers.

parent 746bea8e
...@@ -733,6 +733,16 @@ void QuickFixOperation::remove(const CPlusPlus::AST *ast) ...@@ -733,6 +733,16 @@ void QuickFixOperation::remove(const CPlusPlus::AST *ast)
remove(startOf(ast), endOf(ast)); remove(startOf(ast), endOf(ast));
} }
void QuickFixOperation::flip(int start1, int end1, int start2, int end2)
{
_changeSet.flip(start1, end1-start1, start2, end2-start2);
}
void QuickFixOperation::flip(const CPlusPlus::AST *ast1, const CPlusPlus::AST *ast2)
{
flip(startOf(ast1), endOf(ast1), startOf(ast2), endOf(ast2));
}
void QuickFixOperation::copy(int start, int end, int to) void QuickFixOperation::copy(int start, int end, int to)
{ {
_changeSet.copy(start, end-start, to); _changeSet.copy(start, end-start, to);
......
...@@ -106,6 +106,8 @@ protected: ...@@ -106,6 +106,8 @@ protected:
void remove(int start, int end); void remove(int start, int end);
void remove(unsigned tokenIndex); void remove(unsigned tokenIndex);
void remove(const CPlusPlus::AST *ast); void remove(const CPlusPlus::AST *ast);
void flip(int start1, int end1, int start2, int end2);
void flip(const CPlusPlus::AST *ast1, const CPlusPlus::AST *ast2);
void copy(int start, int end, int to); void copy(int start, int end, int to);
void copy(unsigned tokenIndex, int to); void copy(unsigned tokenIndex, int to);
void copy(const CPlusPlus::AST *ast, int to); void copy(const CPlusPlus::AST *ast, int to);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment