New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sdl rails #9169
base: master
Are you sure you want to change the base?
sdl rails #9169
Conversation
Refer to this link for build results (access rights to CI server needed): |
d29fdcb
to
7eb5b17
Compare
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
ea1d905
to
a50a515
Compare
Refer to this link for build results (access rights to CI server needed): |
a50a515
to
028aea9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
There were too many comments to post at once. Showing the first 25 out of 307. Check the log or trigger a new build to see more.
#include <freerdp/log.h> | ||
#define TAG CLIENT_TAG("x11") | ||
|
||
static const char* error_code_names[] = { "RAIL_EXEC_S_OK", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays]
static const char* error_code_names[] = { "RAIL_EXEC_S_OK",
^
{ | ||
} | ||
|
||
SdlRail::~SdlRail() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: use '= default' to define a trivial destructor [hicpp-use-equals-default]
client/SDL/rails/sdl_rail.cpp:56:
- {
- }
+ = default;
{ | ||
} | ||
|
||
bool SdlRail::show() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: method 'show' can be made static [readability-convert-member-functions-to-static]
client/SDL/rails/sdl_rail.hpp:41:
- bool show();
+ static bool show();
|
||
bool SdlRail::show() | ||
{ | ||
// TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: missing username/bug in TODO [google-readability-todo]
// TODO | |
// TODO(nin): |
{ | ||
for (auto& it : _windows) | ||
{ | ||
if (!paint_surface(it.first, rect)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: implicit conversion 'BOOL' (aka 'int') -> bool [readability-implicit-bool-conversion]
if (!paint_surface(it.first, rect)) | |
if (paint_surface(it.first, rect) == 0) |
auto margins = appWindow.margins(); | ||
windowMove.left = rect.x - margins.x; | ||
windowMove.top = rect.y - margins.y; | ||
windowMove.right = rect.x + rect.w + margins.w; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: narrowing conversion from 'int' to signed type 'INT16' (aka 'short') is implementation-defined [bugprone-narrowing-conversions]
windowMove.right = rect.x + rect.w + margins.w;
^
windowMove.left = rect.x - margins.x; | ||
windowMove.top = rect.y - margins.y; | ||
windowMove.right = rect.x + rect.w + margins.w; | ||
windowMove.bottom = rect.y + rect.h + margins.h; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: narrowing conversion from 'int' to signed type 'INT16' (aka 'short') is implementation-defined [bugprone-narrowing-conversions]
windowMove.bottom = rect.y + rect.h + margins.h;
^
windowMove.right = rect.x + rect.w + margins.w; | ||
windowMove.bottom = rect.y + rect.h + margins.h; | ||
|
||
WINPR_ASSERT(_rail); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: avoid do-while loops [cppcoreguidelines-avoid-do-while]
WINPR_ASSERT(_rail);
^
Additional context
winpr/include/winpr/assert.h:35: expanded from macro 'WINPR_ASSERT'
do \
^
windowMove.right = rect.x + rect.w + margins.w; | ||
windowMove.bottom = rect.y + rect.h + margins.h; | ||
|
||
WINPR_ASSERT(_rail); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay]
WINPR_ASSERT(_rail);
^
Additional context
winpr/include/winpr/assert.h:38: expanded from macro 'WINPR_ASSERT'
winpr_int_assert(#cond, __FILE__, __func__, __LINE__); \
^
windowMove.bottom = rect.y + rect.h + margins.h; | ||
|
||
WINPR_ASSERT(_rail); | ||
WINPR_ASSERT(_rail->ClientWindowMove); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: avoid do-while loops [cppcoreguidelines-avoid-do-while]
WINPR_ASSERT(_rail->ClientWindowMove);
^
Additional context
winpr/include/winpr/assert.h:35: expanded from macro 'WINPR_ASSERT'
do \
^
Refer to this link for build results (access rights to CI server needed): |
No description provided.