* @return -1 if line is before diff, 0 if line is in diff and
* 1 if line is after diff.
*/
-int DiffList::LineRelDiff(unsigned nLine, unsigned nDiff) const
+int DiffList::LineRelDiff(int nLine, int nDiff) const
{
const DIFFRANGE * dfi = DiffRangeAt(nDiff);
if (nLine < dfi->dbegin[0])
* @param [in] nDiff Index to diff table
* @return true if line is inside given difference.
*/
-bool DiffList::LineInDiff(unsigned nLine, unsigned nDiff) const
+bool DiffList::LineInDiff(int nLine, int nDiff) const
{
const DIFFRANGE * dfi = DiffRangeAt(nDiff);
if (nLine >= dfi->dbegin[0] && nLine <= dfi->dend[0])
* @param [in] nLine Linenumber, 0-based.
* @return Index to diff table, -1 if line is not inside any diff.
*/
-int DiffList::LineToDiff(unsigned nLine) const
+int DiffList::LineToDiff(int nLine) const
{
const int nDiffCount = (int) m_diffs.size();
if (nDiffCount == 0)
* @param [in] nLine First line searched.
* @return Index for next difference or -1 if no difference is found.
*/
-int DiffList::PrevSignificantDiffFromLine(unsigned nLine) const
+int DiffList::PrevSignificantDiffFromLine(int nLine) const
{
int nDiff = -1;
const int size = (int) m_diffs.size();
* @param [in] nLine First line searched.
* @return Index for previous difference or -1 if no difference is found.
*/
-int DiffList::NextSignificantDiffFromLine(unsigned nLine) const
+int DiffList::NextSignificantDiffFromLine(int nLine) const
{
int nDiff = -1;
const int nDiffCount = (int) m_diffs.size();
* @param [in] nLine First line searched.
* @return Index for next difference or -1 if no difference is found.
*/
-int DiffList::PrevSignificant3wayDiffFromLine(unsigned nLine, int nDiffType) const
+int DiffList::PrevSignificant3wayDiffFromLine(int nLine, int nDiffType) const
{
for (int i = m_diffs.size() - 1; i >= 0 ; i--)
{
* @param [in] nLine First line searched.
* @return Index for previous difference or -1 if no difference is found.
*/
-int DiffList::NextSignificant3wayDiffFromLine(unsigned nLine, int nDiffType) const
+int DiffList::NextSignificant3wayDiffFromLine(int nLine, int nDiffType) const
{
const int nDiffCount = m_diffs.size();
else if (pdr->op == OP_3RDONLY)
return 2;
return -1;
+ default:
+ return -1;
}
}
\ No newline at end of file
int GetSignificantIndex(int nDiff) const;
bool GetDiff(int nDiff, DIFFRANGE & di) const;
bool SetDiff(int nDiff, const DIFFRANGE & di);
- int LineRelDiff(unsigned nLine, unsigned nDiff) const;
- bool LineInDiff(unsigned nLine, unsigned nDiff) const;
- int LineToDiff(unsigned nLine) const;
+ int LineRelDiff(int nLine, int nDiff) const;
+ bool LineInDiff(int nLine, int nDiff) const;
+ int LineToDiff(int nLine) const;
bool GetPrevDiff(int nLine, int & nDiff) const;
bool GetNextDiff(int nLine, int & nDiff) const;
bool HasSignificantDiffs() const;
- int PrevSignificantDiffFromLine(unsigned nLine) const;
- int NextSignificantDiffFromLine(unsigned nLine) const;
+ int PrevSignificantDiffFromLine(int nLine) const;
+ int NextSignificantDiffFromLine(int nLine) const;
int FirstSignificantDiff() const;
int NextSignificantDiff(int nDiff) const;
int PrevSignificantDiff(int nDiff) const;
int LastSignificantDiff() const;
const DIFFRANGE * FirstSignificantDiffRange() const;
const DIFFRANGE * LastSignificantDiffRange() const;
- int PrevSignificant3wayDiffFromLine(unsigned nLine, int nDiffType) const;
- int NextSignificant3wayDiffFromLine(unsigned nLine, int nDiffType) const;
+ int PrevSignificant3wayDiffFromLine(int nLine, int nDiffType) const;
+ int NextSignificant3wayDiffFromLine(int nLine, int nDiffType) const;
int FirstSignificant3wayDiff(int nDiffType) const;
int NextSignificant3wayDiff(int nDiff, int nDiffType) const;
int PrevSignificant3wayDiff(int nDiff, int nDiffType) const;