Skip to content

Conversation

@ConnorClancyDeakin
Copy link

Description

The ticket addressed with this pull request was to investigate if font_load_size and font_has_size have a use or if they are redundant and if they are redundant they should be removed. After investigating them and testing the drawing functions I have found that when you actually draw with a font size that it does not have it just loads the font size anyway without using either function making them both redundant even in the use case of checking for errors.

This change does have the potential to cause issues with people who currently are using the functions though and would need the documentation to be updated, but it does address the ticket. Personally i'm not positive if the change is neccassery but this is the change so others can review it and see if it is useful.

Type of change

Please delete options that are not relevant.

  • [✓ ] Removal of redundant functions
  • [✓ ] Breaking change (fix or feature that would cause existing functionality to not work as
    expected)

How Has This Been Tested?

This can be tested just through building and running the test programs more specifically the text test it should run as normal apart from the parts that explicitly test the two functions those have been removed, now all the fonts are loaded just through the draw function.

Testing Checklist

  • [ ✓] Tested with sktest
  • [✓ ] Tested with skunit_tests

Checklist

  • [ ✓] My code follows the style guidelines of this project
  • [ ✓] I have performed a self-review of my own code
  • [✓ ] I have commented my code in hard-to-understand areas
  • [✓ ] I have made corresponding changes to the documentation
  • [✓ ] My changes generate no new warnings

Extra note

this fulfills the ticket but I'm not sure if the removal is necassery, the functions are definetly redundant but it will absolutly mess with people who are using the functions in their work even if their code would work fine without it, because they would have it in the code it would likely throw errors. But I wasn't able to find any other pull requests like this to compare it to so if you know more please give feedback in your peer review.

Copy link

@JPF2209 JPF2209 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

  • this code is good enough to approve for the 2nd peer review

Type of Change

  • This piece of code removes a piece of unnecessary code that doesn't need to be there

Code Readability

  • The code is very understandable and clear in what it needs to be comparing it to the other code.

Maintainability

  • As this is in the same style as the other code, it's quite maintainable being simple while doing the job.

Code Simplicity

  • This code is simple in it's execution following established design patterns and best practices .

Edge Cases

  • The code doesn't have anything new dealing with edge cases since it fixed the code

Test Thoroughness

  • Tested in sktest and sk_unit_test and they both worked

Backward Compatibility

  • The code may break for users already using test when the new version releases but it doesn't break SplashKit itself but rather code that uses it so it's fine.

Performance Considerations

  • Performance works well but it isn't usually a consideration for this type of change

Security Concerns

  • This code has no impact negatively or positively for security.

Dependencies

  • There are no new added dependencies.

Documentation

  • The documentation provided is through and simple to follow at the same time

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.

2 participants