Skip to content

Commit bc658be

Browse files
committed
[LINT] error 578 (bis)
Declaration of symbol 'Symbol' hides symbol 'Symbol' (Location) Signed-off-by: Jocelyn Legault <jocelynlegault@gmail.com>
1 parent b894433 commit bc658be

9 files changed

Lines changed: 14 additions & 14 deletions

PythonScript/src/NotepadPlusWrapper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ void NotepadPlusWrapper::notify(SCNotification *notifyCode)
130130
}
131131

132132

133-
bool NotepadPlusWrapper::callback(PyObject* callback, boost::python::list events)
133+
bool NotepadPlusWrapper::addCallback(PyObject* callback, boost::python::list events)
134134
{
135135
if (PyCallable_Check(callback))
136136
{
@@ -653,7 +653,7 @@ boost::python::object NotepadPlusWrapper::prompt(boost::python::object promptObj
653653

654654
PromptDialog::PROMPT_RESULT result;
655655
Py_BEGIN_ALLOW_THREADS
656-
result = promptDlg.prompt(cPrompt, cTitle, cInitial);
656+
result = promptDlg.showPrompt(cPrompt, cTitle, cInitial);
657657
Py_END_ALLOW_THREADS
658658

659659
if (PromptDialog::RESULT_OK == result)

PythonScript/src/NotepadPlusWrapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ class NotepadPlusWrapper
549549
bool runMenuCommandNoRefresh(boost::python::str menuName, boost::python::str menuOption)
550550
{ return runMenuCommand(menuName, menuOption, false); };
551551

552-
bool callback(PyObject* callback, boost::python::list events);
552+
bool addCallback(PyObject* callback, boost::python::list events);
553553

554554

555555
void clearAllCallbacks();

PythonScript/src/NotepadPython.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void export_notepad()
5353
.def("getFormatType", &NotepadPlusWrapper::getBufferFormatType, "Gets the format type (i.e. Windows, Unix or Mac) of the current buffer. Pass a buffer ID to get the format type of a specific buffer.")
5454
.def("setFormatType", &NotepadPlusWrapper::setFormatType, "Sets the format type (i.e. Windows, Unix or Mac) of the current buffer - use the FORMATTYPE enum. Pass a buffer ID as the second parameter to set the format type of a specific buffer.")
5555
.def("setFormatType", &NotepadPlusWrapper::setBufferFormatType, "Sets the format type (i.e. Windows, Unix or Mac) of the current buffer - use the FORMATTYPE enum. Pass a buffer ID as the second parameter to set the format type of a specific buffer.")
56-
.def("callback", &NotepadPlusWrapper::callback, "Registers a callback function for a notification. Arguments are (function, [list of NOTIFICATION IDs])")
56+
.def("callback", &NotepadPlusWrapper::addCallback, "Registers a callback function for a notification. Arguments are (function, [list of NOTIFICATION IDs])")
5757
.def("activateFile", &NotepadPlusWrapper::activateFileString, "Activates the document with the given filename")
5858
.def("close", &NotepadPlusWrapper::closeDocument, "Closes the currently active document")
5959
.def("closeAll", &NotepadPlusWrapper::closeAllDocuments, "Closes all open documents")

PythonScript/src/ProcessExecute.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,18 @@ struct PipeReaderArgs
5151
class process_start_exception
5252
{
5353
public:
54-
process_start_exception(const char *what)
55-
: m_what(what)
54+
process_start_exception(const char *desc)
55+
: m_desc(desc)
5656
{};
5757

5858
const char *what() const
59-
{ return m_what.c_str();
59+
{ return m_desc.c_str();
6060
}
6161

6262
private:
6363
process_start_exception(); // default constructor disabled
6464

65-
std::string m_what;
65+
std::string m_desc;
6666
};
6767

6868
#endif

PythonScript/src/PromptDialog.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ PromptDialog::~PromptDialog()
1616
{
1717
m_hInst = NULL;
1818
m_hNotepad = NULL;
19-
// m_hSelf is handed down to us and not created by us. Therefore, let's jsut NULL the variable.
19+
// m_hSelf is handed down to us and not created by us. Therefore, let's just NULL the variable.
2020
m_hSelf = NULL;
2121
}
2222

23-
PromptDialog::PROMPT_RESULT PromptDialog::prompt(const char *prompt, const char *title, const char *initial)
23+
PromptDialog::PROMPT_RESULT PromptDialog::showPrompt(const char *prompt, const char *title, const char *initial)
2424
{
2525
m_result = RESULT_CANCEL;
2626
m_prompt = prompt;

PythonScript/src/PromptDialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class PromptDialog
1313
PromptDialog(HINSTANCE hInst, HWND hNotepad);
1414
~PromptDialog();
1515

16-
PROMPT_RESULT prompt(const char *prompt, const char *title, const char *initial);
16+
PROMPT_RESULT showPrompt(const char *prompt, const char *title, const char *initial);
1717
const std::string& getText() { return m_value; }
1818

1919
static BOOL CALLBACK dlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);

PythonScript/src/ScintillaPython.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ BOOST_PYTHON_MODULE(Npp)
1414
boost::python::class_<ScintillaWrapper>("Editor", boost::python::no_init)
1515
.def_readonly("INCLUDELINEENDINGS", &ScintillaWrapper::RE_INCLUDELINEENDINGS)
1616
.def("write", &ScintillaWrapper::AddText, "Add text to the document at current position (alias for addText).")
17-
.def("callback", &ScintillaWrapper::callback, "Registers a callback to a Python function when a Scintilla event occurs. e.g. editor.callback(my_function, [ScintillaNotification.CHARADDED])")
17+
.def("callback", &ScintillaWrapper::addCallback, "Registers a callback to a Python function when a Scintilla event occurs. e.g. editor.callback(my_function, [ScintillaNotification.CHARADDED])")
1818
.def("__getitem__", &ScintillaWrapper::GetLine, "Gets a line from the given (zero based) index")
1919
.def("__len__", &ScintillaWrapper::GetLength, "Gets the length (number of bytes) in the document")
2020
.def("forEachLine", &ScintillaWrapper::forEachLine, "Runs the function passed for each line in the current document. The function gets passed 3 arguments, the contents of the line, the line number (starting from zero), and the total number of lines. If the function returns a number, that number is added to the current line number for the next iteration.\nThat way, if you delete the current line, you should return 0, so as to stay on the current physical line.\n\nUnder normal circumstances, you do not need to return anything from the function (i.e. None)\n(Helper function)")

PythonScript/src/ScintillaWrapper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ void ScintillaWrapper::consume(const std::shared_ptr<CallbackExecArgs>& args)
242242
}
243243
}
244244

245-
bool ScintillaWrapper::callback(PyObject* callback, boost::python::list events)
245+
bool ScintillaWrapper::addCallback(PyObject* callback, boost::python::list events)
246246
{
247247
if (PyCallable_Check(callback))
248248
{

PythonScript/src/ScintillaWrapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class ScintillaWrapper : public NppPythonScript::PyProducerConsumer<CallbackExec
4343
void invalidateHandle() { m_handle = NULL; };
4444

4545
void notify(SCNotification *notifyCode);
46-
bool callback(PyObject* callback, boost::python::list events);
46+
bool addCallback(PyObject* callback, boost::python::list events);
4747

4848
void clearAllCallbacks();
4949
void clearCallbackFunction(PyObject* callback);

0 commit comments

Comments
 (0)