accepted more suggestions from sonarcloud

This commit is contained in:
Ignacio Rodriguez
2020-11-09 21:46:56 +07:00
parent 455c254462
commit d9e656db97
2 changed files with 4 additions and 9 deletions

View File

@ -848,12 +848,7 @@ void
XWindowsScreen::fakeMouseRelativeMove(SInt32 dx, SInt32 dy) const
{
// FIXME -- ignore xinerama for now
// if (false && m_xinerama && m_xtestIsXineramaUnaware) {
// XWarpPointer(m_display, None, m_root, 0, 0, 0, 0, x, y);
// }
// else {
XTestFakeRelativeMotionEvent(m_display, dx, dy, CurrentTime);
// }
XFlush(m_display);
}

View File

@ -220,12 +220,12 @@ TEST(ArgParserTests, parseToolArgs_matches_correspondingly)
for (auto const &test: tests) {
ToolArgs toolArgs;
EXPECT_FALSE(test.second(toolArgs));
const char *twoArgs[2] {"syntool", test.first};
EXPECT_TRUE(parser.parseToolArgs(toolArgs, 2, twoArgs));
std::array<const char *, 2> twoArgs {"syntool", test.first};
EXPECT_TRUE(parser.parseToolArgs(toolArgs, 2, twoArgs.data()));
EXPECT_TRUE(test.second(toolArgs));
}
ToolArgs toolArgs;
const char *twoArgs[2] {"syntool", "--garbage"};
EXPECT_FALSE(parser.parseToolArgs(toolArgs, 2, twoArgs));
std::array<const char *, 2> twoArgs {"syntool", "--garbage"};
EXPECT_FALSE(parser.parseToolArgs(toolArgs, 2, twoArgs.data()));
}