SDLPP: slight code cleanup

This commit is contained in:
zvon 2021-08-07 12:13:03 +02:00
parent d4393ef179
commit 7b1ef25f37
3 changed files with 5 additions and 5 deletions

View File

@ -32,7 +32,7 @@ void Scene::addObject( const std::shared_ptr< RenderObject > &obj ) {
rightmost_obj = obj;
}
}
void Scene::setZIndex( const std::shared_ptr< RenderObject > &obj, int index ) {
void Scene::setZIndex( const std::shared_ptr< RenderObject > &obj, uint64_t index ) {
std::lock_guard< std::mutex > guard( render_mutex );
int original_index = 0;
for ( long unsigned int i = 0; i < render_objects.size(); i++ ) {

View File

@ -16,7 +16,7 @@ class SDLPPSCOPE Scene {
public:
Scene( std::shared_ptr< Renderer > &r );
void addObject( const std::shared_ptr< RenderObject > &obj );
void setZIndex( const std::shared_ptr< RenderObject > &obj, int index );
void setZIndex( const std::shared_ptr< RenderObject > &obj, uint64_t index );
void moveDownZ( const std::shared_ptr< RenderObject > &obj );
void moveUpZ( const std::shared_ptr< RenderObject > &obj );
void moveZ( const std::shared_ptr< RenderObject > &obj, int addition );

View File

@ -9,12 +9,12 @@ class SDLPPSCOPE RenderObject;
class SDLPPSCOPE Visitor {
public:
Visitor() {}
Visitor() = default;
virtual void visit( const RenderObject &obj ) = 0;
virtual void setFromId( uint64_t id ) = 0;
virtual uint64_t getFromId() = 0;
virtual uint64_t getFromId() const = 0;
virtual void setVisitorType( uint64_t type ) = 0;
virtual uint64_t getVisitorType() = 0;
virtual uint64_t getVisitorType() const = 0;
};
} // namespace SDLPP