Skip to content

Commit

Permalink
Enforce variable and parameter casing style
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisThrasher committed Sep 8, 2024
1 parent 055e695 commit b662349
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Checks: >
clang-analyzer-*,
cppcoreguidelines-*,
modernize-*,
readability-identifier-naming,
-bugprone-easily-swappable-parameters,
-bugprone-narrowing-conversions,
-clang-analyzer-core.NonNullParamChecker,
Expand All @@ -26,6 +27,10 @@ Checks: >
-modernize-redundant-void-arg,
-modernize-use-trailing-return-type,
-modernize-use-using,
CheckOptions:
- { key: readability-identifier-naming.VariableCase, value: camelBack }
- { key: readability-identifier-naming.GlobalVariableCase, value: aNy_CasE }
- { key: readability-identifier-naming.ParameterCase, value: camelBack }
HeaderFilterRegex: '.*'
WarningsAsErrors: '*'
UseColor: true
8 changes: 4 additions & 4 deletions src/CSFML/Graphics/Font.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ sfGlyph sfFont_getGlyph(const sfFont* font, uint32_t codePoint, unsigned int cha
{
assert(font);

sf::Glyph SFMLGlyph = font->This.getGlyph(codePoint, characterSize, bold, outlineThickness);
sf::Glyph sfmlGlyph = font->This.getGlyph(codePoint, characterSize, bold, outlineThickness);

sfGlyph glyph{};
glyph.advance = SFMLGlyph.advance;
glyph.bounds = convertRect(SFMLGlyph.bounds);
glyph.textureRect = convertRect(SFMLGlyph.textureRect);
glyph.advance = sfmlGlyph.advance;
glyph.bounds = convertRect(sfmlGlyph.bounds);
glyph.textureRect = convertRect(sfmlGlyph.textureRect);

return glyph;
}
Expand Down
4 changes: 2 additions & 2 deletions src/CSFML/Graphics/Text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ void sfText_setString(sfText* text, const char* string)
void sfText_setUnicodeString(sfText* text, const sfChar32* string)
{
assert(text);
sf::String UTF32Text = reinterpret_cast<const char32_t*>(string);
text->This.setString(UTF32Text);
sf::String utf32Text = reinterpret_cast<const char32_t*>(string);
text->This.setString(utf32Text);
}


Expand Down
6 changes: 3 additions & 3 deletions src/CSFML/Network/Ftp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,12 @@ sfFtpResponse* sfFtp_connect(sfFtp* ftp, sfIpAddress server, unsigned short port
{
assert(ftp);

std::optional<sf::IpAddress> SFMLServer = sf::IpAddress::resolve(server.address);
std::optional<sf::IpAddress> sfmlServer = sf::IpAddress::resolve(server.address);

if (!SFMLServer)
if (!sfmlServer)
return nullptr;

return new sfFtpResponse{ftp->This.connect(*SFMLServer, port, sf::microseconds(timeout.microseconds))};
return new sfFtpResponse{ftp->This.connect(*sfmlServer, port, sf::microseconds(timeout.microseconds))};
}


Expand Down

0 comments on commit b662349

Please sign in to comment.