From bc76bd05fc1adb9ab798b5306e7aee13760e2b7d Mon Sep 17 00:00:00 2001 From: Vikram Rajkumar Date: Sat, 13 Jun 2015 15:46:20 -0400 Subject: [PATCH] Add missing overrides --- libraries/chain/include/graphene/chain/evaluator.hpp | 2 +- libraries/db/include/graphene/db/flat_index.hpp | 4 ++-- libraries/db/include/graphene/db/generic_index.hpp | 4 ++-- libraries/db/include/graphene/db/index.hpp | 12 ++++++------ libraries/db/include/graphene/db/simple_index.hpp | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/libraries/chain/include/graphene/chain/evaluator.hpp b/libraries/chain/include/graphene/chain/evaluator.hpp index 34a0b0ff..922a056d 100644 --- a/libraries/chain/include/graphene/chain/evaluator.hpp +++ b/libraries/chain/include/graphene/chain/evaluator.hpp @@ -186,7 +186,7 @@ namespace graphene { namespace chain { class evaluator : public generic_evaluator { public: - virtual int get_type()const { return operation::tag::value; } + virtual int get_type()const override { return operation::tag::value; } virtual operation_result evaluate( const operation& o ) final override { diff --git a/libraries/db/include/graphene/db/flat_index.hpp b/libraries/db/include/graphene/db/flat_index.hpp index 1891906b..2df5a23c 100644 --- a/libraries/db/include/graphene/db/flat_index.hpp +++ b/libraries/db/include/graphene/db/flat_index.hpp @@ -51,7 +51,7 @@ namespace graphene { namespace db { modify_callback( _objects[obj.id.instance()] ); } - virtual const object& insert( object&& obj ) + virtual const object& insert( object&& obj )override { auto instance = obj.id.instance(); assert( nullptr != dynamic_cast(&obj) ); @@ -77,7 +77,7 @@ namespace graphene { namespace db { return &_objects[instance]; } - void inspect_all_objects(std::function inspector)const + virtual void inspect_all_objects(std::function inspector)const override { try { for( const auto& ptr : _objects ) diff --git a/libraries/db/include/graphene/db/generic_index.hpp b/libraries/db/include/graphene/db/generic_index.hpp index 7a75e83a..837df43d 100644 --- a/libraries/db/include/graphene/db/generic_index.hpp +++ b/libraries/db/include/graphene/db/generic_index.hpp @@ -41,7 +41,7 @@ namespace graphene { namespace chain { typedef MultiIndexType index_type; typedef ObjectType object_type; - virtual const object& insert( object&& obj ) + virtual const object& insert( object&& obj )override { assert( nullptr != dynamic_cast(&obj) ); auto insert_result = _indices.insert( std::move( static_cast(obj) ) ); @@ -49,7 +49,7 @@ namespace graphene { namespace chain { return *insert_result.first; } - virtual const object& create(const std::function& constructor ) + virtual const object& create(const std::function& constructor )override { ObjectType item; item.id = get_next_id(); diff --git a/libraries/db/include/graphene/db/index.hpp b/libraries/db/include/graphene/db/index.hpp index badc5b97..2c21d392 100644 --- a/libraries/db/include/graphene/db/index.hpp +++ b/libraries/db/include/graphene/db/index.hpp @@ -166,16 +166,16 @@ namespace graphene { namespace db { virtual uint8_t object_type_id()const override { return object_type::type_id; } - virtual object_id_type get_next_id()const { return _next_id; } - virtual void use_next_id() { ++_next_id.number; } - virtual void set_next_id( object_id_type id ) { _next_id = id; } + virtual object_id_type get_next_id()const override { return _next_id; } + virtual void use_next_id()override { ++_next_id.number; } + virtual void set_next_id( object_id_type id )override { _next_id = id; } - virtual const object& load( const std::vector& data ) + virtual const object& load( const std::vector& data )override { return DerivedIndex::insert( fc::raw::unpack( data ) ); } - virtual void open( const shared_ptr >>& db ) + virtual void open( const shared_ptr >>& db )override { auto first = object_id_type( DerivedIndex::object_type::space_id, DerivedIndex::object_type::type_id, 0 ); auto last = object_id_type( DerivedIndex::object_type::space_id, DerivedIndex::object_type::type_id+1, 0 ); @@ -186,7 +186,7 @@ namespace graphene { namespace db { ++itr; } } - virtual const object& create(const std::function& constructor ) + virtual const object& create(const std::function& constructor )override { const auto& result = DerivedIndex::create( constructor ); on_add( result ); diff --git a/libraries/db/include/graphene/db/simple_index.hpp b/libraries/db/include/graphene/db/simple_index.hpp index e7ee66ac..9c4b0742 100644 --- a/libraries/db/include/graphene/db/simple_index.hpp +++ b/libraries/db/include/graphene/db/simple_index.hpp @@ -53,7 +53,7 @@ namespace graphene { namespace db { modify_callback( *_objects[obj.id.instance()] ); } - virtual const object& insert( object&& obj ) + virtual const object& insert( object&& obj )override { auto instance = obj.id.instance(); assert( nullptr != dynamic_cast(&obj) );