1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

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
This commit is contained in:
Loïc Blot 2017-06-16 11:25:52 +02:00 committed by GitHub
parent 49d6e5f4ab
commit 76be103a91
50 changed files with 331 additions and 751 deletions

View file

@ -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));