Add clang-tidy performance-*
checks
This commit is contained in:
parent
ea4c448a85
commit
cafaa1c153
@ -3,6 +3,7 @@ Checks: >
|
||||
clang-analyzer-*,
|
||||
misc-*,
|
||||
modernize-*,
|
||||
performance-*,
|
||||
portability-*,
|
||||
readability-*,
|
||||
-clang-analyzer-nullability.NullablePassedToNonnull,
|
||||
@ -20,6 +21,8 @@ Checks: >
|
||||
-modernize-return-braced-init-list,
|
||||
-modernize-use-nodiscard,
|
||||
-modernize-use-trailing-return-type,
|
||||
-performance-inefficient-string-concatenation,
|
||||
-performance-no-int-to-ptr,
|
||||
-readability-braces-around-statements,
|
||||
-readability-container-contains,
|
||||
-readability-convert-member-functions-to-static,
|
||||
|
@ -61,7 +61,7 @@ TEST_CASE("[Graphics] sf::Texture" * doctest::skip(skipDisplayTests))
|
||||
|
||||
SUBCASE("Construction")
|
||||
{
|
||||
const sf::Texture textureCopy(texture);
|
||||
const sf::Texture textureCopy(texture); // NOLINT(performance-unnecessary-copy-initialization)
|
||||
REQUIRE(textureCopy.getSize() == sf::Vector2u(1, 2));
|
||||
CHECK(textureCopy.copyToImage().getPixel(sf::Vector2u(0, 1)) == sf::Color::Red);
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ TEST_CASE("[Graphics] sf::VertexBuffer" * doctest::skip(true))
|
||||
|
||||
SUBCASE("Construction")
|
||||
{
|
||||
const sf::VertexBuffer vertexBufferCopy(vertexBuffer);
|
||||
const sf::VertexBuffer vertexBufferCopy(vertexBuffer); // NOLINT(performance-unnecessary-copy-initialization)
|
||||
CHECK(vertexBufferCopy.getVertexCount() == 0);
|
||||
CHECK(vertexBufferCopy.getNativeHandle() == 0);
|
||||
CHECK(vertexBufferCopy.getPrimitiveType() == sf::PrimitiveType::LineStrip);
|
||||
|
Loading…
Reference in New Issue
Block a user