Skip to content

Conversation

@Vraiment
Copy link
Contributor

Here are the changes for issue #81 in addition to other Display related functions. Some of them might seem silly to add a wrapper, but I think is a good idea to be able to report errors throwing SDL2pp::Exception so you can catch all of them (or any of the given calls) by using a try/catch block.

using std::string;

namespace SDL2pp {
SDL_Rect GetDisplayBounds(const int displayIndex) {
Copy link
Member

Choose a reason for hiding this comment

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

  • No need for const for copied arguments, ever.
  • Why not SDL2pp::Rect?

/// \param[in] vertical The diagonal DPI of the display
///
////////////////////////////////////////////////////////////
DPI(const float diagonal = 0, const float horizontal = 0, const float vertical = 0);
Copy link
Member

Choose a reason for hiding this comment

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

Can we just drop this and use braced-init?

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