From 76be103a91d6987527af19e87d93007be8ba8a67 Mon Sep 17 00:00:00 2001 From: Loïc Blot Date: Fri, 16 Jun 2017 11:25:52 +0200 Subject: C++11 patchset 9: move hardcoded init parameters to class definitions (part 1) (#5984) * C++11 patchset 9: move hardcoded init parameters to class definitions C++11 introduced the possibility to define the default values directly in class definitions, do it on current code Also remove some unused attributes * CollisionInfo::bouncy * collisionMoveResult::collides_xy * collisionMoveResult::standing_on_unloaded * Clouds::speed * More constructor cleanups + some variables removal * remove only write guiFormSpecMenu::m_old_tooltip * move header included inside defintions in genericobject.h * remove some unused since years exception classes * remove unused & empty debug_stacks_init * remove unused & empty content_nodemeta_serialize_legacy * remove forgotten useless bool (bouncy) in collision.cpp code --- src/client.cpp | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) (limited to 'src/client.cpp') diff --git a/src/client.cpp b/src/client.cpp index 1f6f64ce0..7a097bc0d 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -69,11 +69,6 @@ Client::Client( bool ipv6, GameUIFlags *game_ui_flags ): - m_packetcounter_timer(0.0), - m_connection_reinit_timer(0.1), - m_avg_rtt_timer(0.0), - m_playerpos_send_timer(0.0), - m_ignore_damage_timer(0.0), m_tsrc(tsrc), m_shsrc(shsrc), m_itemdef(itemdef), @@ -92,40 +87,13 @@ Client::Client( m_con(PROTOCOL_ID, 512, CONNECTION_TIMEOUT, ipv6, this), m_address_name(address_name), m_device(device), - m_camera(NULL), - m_minimap(NULL), - m_minimap_disabled_by_server(false), m_server_ser_ver(SER_FMT_VER_INVALID), - m_proto_ver(0), - m_playeritem(0), - m_inventory_updated(false), - m_inventory_from_server(NULL), - m_inventory_from_server_age(0.0), - m_animation_time(0), - m_crack_level(-1), - m_crack_pos(0,0,0), m_last_chat_message_sent(time(NULL)), - m_chat_message_allowance(5.0f), - m_map_seed(0), m_password(password), m_chosen_auth_mech(AUTH_MECHANISM_NONE), - m_auth_data(NULL), - m_access_denied(false), - m_access_denied_reconnect(false), - m_itemdef_received(false), - m_nodedef_received(false), m_media_downloader(new ClientMediaDownloader()), - m_time_of_day_set(false), - m_last_time_of_day_f(-1), - m_time_of_day_update_timer(0), - m_recommended_send_interval(0.1), - m_removed_sounds_check_timer(0), m_state(LC_Created), - m_localdb(NULL), - m_script(NULL), - m_mod_storage_save_timer(10.0f), - m_game_ui_flags(game_ui_flags), - m_shutdown(false) + m_game_ui_flags(game_ui_flags) { // Add local player m_env.setLocalPlayer(new LocalPlayer(this, playername)); -- cgit v1.2.3