Skip to content
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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

sdl rails #9169

wants to merge 1 commit into from

Conversation

akallabeth
Copy link
Member

No description provided.

@akallabeth akallabeth changed the title xx sdl rails Jul 18, 2023
@akallabeth akallabeth linked an issue Jul 18, 2023 that may be closed by this pull request
@freerdp-bot
Copy link

Refer to this link for build results (access rights to CI server needed):
https://ci.freerdp.com//job/PullRequestTester/9862/

@akallabeth akallabeth force-pushed the sdl_client_rails branch 2 times, most recently from d29fdcb to 7eb5b17 Compare July 18, 2023 16:40
@freerdp-bot
Copy link

Refer to this link for build results (access rights to CI server needed):
https://ci.freerdp.com//job/PullRequestTester/9863/

@freerdp-bot
Copy link

Refer to this link for build results (access rights to CI server needed):
https://ci.freerdp.com//job/PullRequestTester/9864/

@freerdp-bot
Copy link

Refer to this link for build results (access rights to CI server needed):
https://ci.freerdp.com//job/PullRequestTester/9873/

@freerdp-bot
Copy link

Refer to this link for build results (access rights to CI server needed):
https://ci.freerdp.com//job/PullRequestTester/10600/

Copy link

@github-actions github-actions bot left a 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",

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()

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()

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

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]

Suggested change
// TODO
// TODO(nin):

{
for (auto& it : _windows)
{
if (!paint_surface(it.first, rect))

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]

Suggested change
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;

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;

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);

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);

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);

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                                                             \
 ^

@freerdp-bot
Copy link

Refer to this link for build results (access rights to CI server needed):
https://ci.freerdp.com//job/PullRequestTester/11450/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SDL] rails support
2 participants