From 759fed90fb8b0461585d65699055e301e4a38e26 Mon Sep 17 00:00:00 2001 From: andrea Date: Thu, 7 Sep 2023 16:53:49 +0200 Subject: [PATCH] fix compilation warning --- src/Gui/PythonConsole.cpp | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/Gui/PythonConsole.cpp b/src/Gui/PythonConsole.cpp index 588940fd67..f48ff4a530 100644 --- a/src/Gui/PythonConsole.cpp +++ b/src/Gui/PythonConsole.cpp @@ -77,9 +77,8 @@ inline bool cursorBeyond( const QTextCursor &cursor, const QTextCursor &limit, i if (cursor.hasSelection()) { return (cursor.selectionStart() >= pos && cursor.selectionEnd() >= pos); } - else { - return cursor.position() >= (pos + shift); - } + + return cursor.position() >= (pos + shift); } struct PythonConsoleP @@ -87,9 +86,9 @@ struct PythonConsoleP enum Output {Error = 20, Message = 21}; enum CopyType {Normal, History, Command}; CopyType type; - PyObject *_stdoutPy, *_stderrPy, *_stdinPy, *_stdin; - InteractiveInterpreter* interpreter; - CallTipsList* callTipsList; + PyObject *_stdoutPy=nullptr, *_stderrPy=nullptr, *_stdinPy=nullptr, *_stdin=nullptr; + InteractiveInterpreter* interpreter=nullptr; + CallTipsList* callTipsList=nullptr; ConsoleHistory history; QString output, error, info, historyFile; QStringList statements; @@ -99,12 +98,6 @@ struct PythonConsoleP PythonConsoleP() { type = Normal; - _stdoutPy = nullptr; - _stderrPy = nullptr; - _stdinPy = nullptr; - _stdin = nullptr; - interpreter = nullptr; - callTipsList = nullptr; interactive = false; historyFile = QString::fromUtf8((App::Application::getUserAppDataDir() + "PythonHistory.log").c_str()); colormap[QLatin1String("Text")] = qApp->palette().windowText().color();