mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-18 11:29:20 +02:00
refactor(sonar): remove empty statements, one declaration per statement (cpp:S1116, cpp:S1659)
This commit is contained in:
@@ -178,7 +178,8 @@ void render_task::run()
|
||||
for (const auto &cmd : commands)
|
||||
{
|
||||
std::string baseCmd;
|
||||
int p1 = 0, p2 = 0;
|
||||
int p1 = 0;
|
||||
int p2 = 0;
|
||||
|
||||
size_t pos1 = cmd.find(';');
|
||||
if (pos1 == std::string::npos)
|
||||
@@ -636,7 +637,9 @@ void python_taskqueue::error()
|
||||
else
|
||||
{
|
||||
// nie dziala buffor pythona
|
||||
PyObject *type, *value, *traceback;
|
||||
PyObject *type;
|
||||
PyObject *value;
|
||||
PyObject *traceback;
|
||||
PyErr_Fetch(&type, &value, &traceback);
|
||||
if (type == nullptr)
|
||||
{
|
||||
|
||||
@@ -130,10 +130,9 @@ basic_controller::deserialize_operation( cParser &Input ) -> bool {
|
||||
cParser operationparser( operationdata, cParser::buffer_TEXT );
|
||||
// HACK: operation potentially contains 1-2 parameters so we try to grab the whole set
|
||||
operationparser.getTokens( 3, "\t " );
|
||||
std::string
|
||||
operationname,
|
||||
operationelement,
|
||||
operationparameter;
|
||||
std::string operationname;
|
||||
std::string operationelement;
|
||||
std::string operationparameter;
|
||||
operationparser
|
||||
>> operationname
|
||||
>> operationelement
|
||||
|
||||
@@ -49,7 +49,8 @@ python_screen_viewer::python_screen_viewer(std::shared_ptr<python_rt> rt, std::s
|
||||
monitor, false, Global.python_sharectx);
|
||||
|
||||
{
|
||||
int w, h;
|
||||
int w;
|
||||
int h;
|
||||
glfwGetWindowSize(conf->window, &w, &h);
|
||||
conf->window_size = glm::ivec2(w, h);
|
||||
glfwGetFramebufferSize(conf->window, &w, &h);
|
||||
@@ -118,7 +119,10 @@ void python_screen_viewer::threadfunc()
|
||||
for (auto &window : m_windows) {
|
||||
|
||||
unsigned char *image = nullptr;
|
||||
int format, components, width, height;
|
||||
int format;
|
||||
int components;
|
||||
int width;
|
||||
int height;
|
||||
|
||||
if (!Global.python_sharectx) {
|
||||
std::lock_guard<std::mutex> guard(m_rt->mutex);
|
||||
|
||||
Reference in New Issue
Block a user