#define IS_NODE(x) (x == NODE || x == NODE_R || x == NODE_L)\r
\r
\r
-void Lanes::init(const QString& expectedSha) {\r
+void Lanes::init(const CGitHash& expectedSha) {\r
\r
clear();\r
activeLane = 0;\r
typeVec[activeLane] = BOUNDARY;\r
}\r
\r
-bool Lanes::isFork(const QString& sha, bool& isDiscontinuity) {\r
+bool Lanes::isFork(const CGitHash& sha, bool& isDiscontinuity) {\r
\r
int pos = findNextSha(sha, 0);\r
isDiscontinuity = (activeLane != pos);\r
*/\r
}\r
\r
-void Lanes::setFork(const QString& sha) {\r
+void Lanes::setFork(const CGitHash& sha) {\r
\r
int rangeStart, rangeEnd, idx;\r
rangeStart = rangeEnd = idx = findNextSha(sha, 0);\r
}\r
}\r
\r
-void Lanes::setMerge(const QStringList& parents) {\r
+void Lanes::setMerge(const CGitHashList& parents) {\r
// setFork() must be called before setMerge()\r
\r
if (boundary)\r
t = NODE;\r
\r
int rangeStart = activeLane, rangeEnd = activeLane;\r
- QStringList::const_iterator it(parents.begin());\r
+ CGitHashList::const_iterator it(parents.begin());\r
for (++it; it != parents.end(); ++it) { // skip first parent\r
\r
int idx = findNextSha(*it, 0);\r
typeVec[activeLane] = APPLIED; // TODO test with boundaries\r
}\r
\r
-void Lanes::changeActiveLane(const QString& sha) {\r
+void Lanes::changeActiveLane(const CGitHash& sha) {\r
\r
int& t = typeVec[activeLane];\r
if (t == INITIAL || isBoundary(t))\r
typeVec[activeLane] = ACTIVE; // TODO test with boundaries\r
}\r
\r
-void Lanes::nextParent(const QString& sha) {\r
+void Lanes::nextParent(const CGitHash& sha) {\r
\r
- nextShaVec[activeLane] = (boundary ? QString(_T("")) : sha);\r
+ if(boundary)\r
+ nextShaVec[activeLane].Empty();\r
+ else\r
+ nextShaVec[activeLane] = sha;\r
}\r
\r
-int Lanes::findNextSha(const QString& next, int pos) {\r
+int Lanes::findNextSha(const CGitHash& next, int pos) {\r
\r
for (unsigned int i = pos; i < nextShaVec.size(); i++)\r
if (nextShaVec[i] == next)\r
return -1;\r
}\r
\r
-int Lanes::add(int type, const QString& next, int pos) {\r
+int Lanes::add(int type, const CGitHash& next, int pos) {\r
\r
// first check empty lanes starting from pos\r
if (pos < (int)typeVec.size()) {\r