Skip to content

Commit

Permalink
Work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
skhaz committed Oct 30, 2023
1 parent 10e097d commit ee81b97
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ int application::run() {
try {
filesystem::mount("bundle.zip", "/");
engine engine;
engine.create_window("Carimbo", 640, 480, true);
engine.create_window("Carimbo", 640, 480, false);

Check warning on line 13 in src/application.cpp

View workflow job for this annotation

GitHub Actions / lint

/src/application.cpp:13:37 [cppcoreguidelines-avoid-magic-numbers

640 is a magic number; consider replacing it with a named constant

Check warning on line 13 in src/application.cpp

View workflow job for this annotation

GitHub Actions / lint

/src/application.cpp:13:42 [cppcoreguidelines-avoid-magic-numbers

480 is a magic number; consider replacing it with a named constant
engine.run();
} catch (const std::exception &e) {
std::cerr << e.what() << std::endl;
Expand Down
7 changes: 3 additions & 4 deletions src/eventmanager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ class event_manager : private noncopyable {
event_manager() = default;
~event_manager() = default;

void add_listener(std::shared_pre<eventlistener> listener);

void remove_listener(std::function<eventlistener> listener);
}
// void add_listener(std::shared_pre<eventlistener> listener);
// void remove_listener(std::function<eventlistener> listener);
};

#endif
2 changes: 2 additions & 0 deletions src/noncopyable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ class noncopyable {

noncopyable(const noncopyable &) = delete;
noncopyable &operator=(const noncopyable &) = delete;

Check warning on line 11 in src/noncopyable.hpp

View workflow job for this annotation

GitHub Actions / lint

/src/noncopyable.hpp:11:16 [modernize-use-trailing-return-type]

use a trailing return type for this function
noncopyable(noncopyable &&) = default;
noncopyable &operator=(noncopyable &&) = default;

Check warning on line 13 in src/noncopyable.hpp

View workflow job for this annotation

GitHub Actions / lint

/src/noncopyable.hpp:13:16 [modernize-use-trailing-return-type]

use a trailing return type for this function
};

#endif
4 changes: 3 additions & 1 deletion src/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ window::window(std::string_view title, int32_t width, int32_t height, bool fulls
}
}

window::operator SDL_Window *() { return _window.get(); }
window::operator SDL_Window *() {
return _window.get();
}

const std::shared_ptr<renderer> window::create_renderer() const {
return std::make_shared<renderer>(&*_window);
Expand Down

0 comments on commit ee81b97

Please sign in to comment.