Skip to content

Commit 2516248

Browse files
committed
[LINT] error 864
Expression involving variable 'Symbol' possibly depends on order of evaluation Signed-off-by: Jocelyn Legault <[email protected]>
1 parent 73e3b9f commit 2516248

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

PythonScript/src/CreateWrapper.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ def constString(v, out):
9595

9696
def retString(v, out):
9797
out.write("\tPythonCompatibleStrBuffer result(callScintilla(" + symbolName(v) + ") + 1);\n")
98+
out.write("\t// result.size() does not depend on the order of evaluation here\n")
99+
out.write("\t//lint -e{864}\n")
98100
out.write("\tcallScintilla(" + symbolName(v) + ", result.size(), reinterpret_cast<LPARAM>(*result));\n")
99101
out.write("\treturn boost::python::str(result.c_str());\n")
100102

PythonScript/src/ScintillaWrapperGenerated.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ void ScintillaWrapper::SetAnchor(int posAnchor)
245245
boost::python::str ScintillaWrapper::GetCurLine()
246246
{
247247
PythonCompatibleStrBuffer result(callScintilla(SCI_GETCURLINE) + 1);
248+
// result.size() does not depend on the order of evaluation here
249+
//lint -e{864}
248250
callScintilla(SCI_GETCURLINE, result.size(), reinterpret_cast<LPARAM>(*result));
249251
return boost::python::str(result.c_str());
250252
}
@@ -1607,6 +1609,8 @@ void ScintillaWrapper::SetText(boost::python::str text)
16071609
boost::python::str ScintillaWrapper::GetText()
16081610
{
16091611
PythonCompatibleStrBuffer result(callScintilla(SCI_GETTEXT) + 1);
1612+
// result.size() does not depend on the order of evaluation here
1613+
//lint -e{864}
16101614
callScintilla(SCI_GETTEXT, result.size(), reinterpret_cast<LPARAM>(*result));
16111615
return boost::python::str(result.c_str());
16121616
}

0 commit comments

Comments
 (0)