From 4fe75fd30b1e8993d929d38b609af6b331919873 Mon Sep 17 00:00:00 2001 From: Relintai Date: Fri, 10 Apr 2020 13:56:08 +0200 Subject: [PATCH] Clang format. --- data/biome_data.cpp | 36 ++++++++++++++-------------- data/dungeon_data.cpp | 48 +++++++++++++++++++------------------- data/dungeon_room_data.cpp | 30 ++++++++++++------------ data/planet_data.cpp | 24 +++++++++---------- world_generator.cpp | 6 ++--- 5 files changed, 72 insertions(+), 72 deletions(-) diff --git a/data/biome_data.cpp b/data/biome_data.cpp index d5c143a..da61ca7 100644 --- a/data/biome_data.cpp +++ b/data/biome_data.cpp @@ -87,11 +87,11 @@ int BiomeData::get_dungeon_data_count() const { Vector BiomeData::get_dungeon_datas() { Vector r; for (int i = 0; i < _dungeon_datas.size(); i++) { - #if VERSION_MAJOR < 4 +#if VERSION_MAJOR < 4 r.push_back(_dungeon_datas[i].get_ref_ptr()); - #else +#else r.push_back(_dungeon_datas[i]); - #endif +#endif } return r; } @@ -132,11 +132,11 @@ int BiomeData::get_prop_data_count() const { Vector BiomeData::get_prop_datas() { Vector r; for (int i = 0; i < _prop_datas.size(); i++) { - #if VERSION_MAJOR < 4 +#if VERSION_MAJOR < 4 r.push_back(_prop_datas[i].get_ref_ptr()); - #else +#else r.push_back(_prop_datas[i]); - #endif +#endif } return r; } @@ -177,11 +177,11 @@ int BiomeData::get_entity_data_count() const { Vector BiomeData::get_entity_datas() { Vector r; for (int i = 0; i < _entity_datas.size(); i++) { - #if VERSION_MAJOR < 4 +#if VERSION_MAJOR < 4 r.push_back(_entity_datas[i].get_ref_ptr()); - #else +#else r.push_back(_entity_datas[i]); - #endif +#endif } return r; } @@ -223,11 +223,11 @@ int BiomeData::get_environment_data_count() const { Vector BiomeData::get_environment_datas() { Vector r; for (int i = 0; i < _environment_datas.size(); i++) { - #if VERSION_MAJOR < 4 +#if VERSION_MAJOR < 4 r.push_back(_environment_datas[i].get_ref_ptr()); - #else +#else r.push_back(_environment_datas[i]); - #endif +#endif } return r; } @@ -266,11 +266,11 @@ int BiomeData::get_voxel_surface_count() const { Vector BiomeData::get_voxel_surfaces() { Vector r; for (int i = 0; i < _voxel_surfaces.size(); i++) { - #if VERSION_MAJOR < 4 +#if VERSION_MAJOR < 4 r.push_back(_voxel_surfaces[i].get_ref_ptr()); - #else +#else r.push_back(_voxel_surfaces[i]); - #endif +#endif } return r; } @@ -309,11 +309,11 @@ int BiomeData::get_liquid_voxel_surface_count() const { Vector BiomeData::get_liquid_voxel_surfaces() { Vector r; for (int i = 0; i < _liquid_voxel_surfaces.size(); i++) { - #if VERSION_MAJOR < 4 +#if VERSION_MAJOR < 4 r.push_back(_liquid_voxel_surfaces[i].get_ref_ptr()); - #else +#else r.push_back(_liquid_voxel_surfaces[i]); - #endif +#endif } return r; } diff --git a/data/dungeon_data.cpp b/data/dungeon_data.cpp index dc74018..46e16d1 100644 --- a/data/dungeon_data.cpp +++ b/data/dungeon_data.cpp @@ -130,11 +130,11 @@ int DungeonData::get_dungeon_room_data_count() const { Vector DungeonData::get_dungeon_room_datas() { Vector r; for (int i = 0; i < _dungeon_room_datas.size(); i++) { - #if VERSION_MAJOR < 4 +#if VERSION_MAJOR < 4 r.push_back(_dungeon_room_datas[i].get_ref_ptr()); - #else +#else r.push_back(_dungeon_room_datas[i]); - #endif +#endif } return r; } @@ -174,11 +174,11 @@ int DungeonData::get_dungeon_start_room_data_count() const { Vector DungeonData::get_dungeon_start_room_datas() { Vector r; for (int i = 0; i < _dungeon_start_room_datas.size(); i++) { - #if VERSION_MAJOR < 4 +#if VERSION_MAJOR < 4 r.push_back(_dungeon_start_room_datas[i].get_ref_ptr()); - #else +#else r.push_back(_dungeon_start_room_datas[i]); - #endif +#endif } return r; } @@ -218,11 +218,11 @@ int DungeonData::get_dungeon_end_room_data_count() const { Vector DungeonData::get_dungeon_end_room_datas() { Vector r; for (int i = 0; i < _dungeon_end_room_datas.size(); i++) { - #if VERSION_MAJOR < 4 +#if VERSION_MAJOR < 4 r.push_back(_dungeon_end_room_datas[i].get_ref_ptr()); - #else +#else r.push_back(_dungeon_end_room_datas[i]); - #endif +#endif } return r; } @@ -262,11 +262,11 @@ int DungeonData::get_dungeon_corridor_data_count() const { Vector DungeonData::get_dungeon_corridor_datas() { Vector r; for (int i = 0; i < _dungeon_corridor_datas.size(); i++) { - #if VERSION_MAJOR < 4 +#if VERSION_MAJOR < 4 r.push_back(_dungeon_corridor_datas[i].get_ref_ptr()); - #else +#else r.push_back(_dungeon_corridor_datas[i]); - #endif +#endif } return r; } @@ -306,11 +306,11 @@ int DungeonData::get_entity_data_count() const { Vector DungeonData::get_entity_datas() { Vector r; for (int i = 0; i < _entity_datas.size(); i++) { - #if VERSION_MAJOR < 4 +#if VERSION_MAJOR < 4 r.push_back(_entity_datas[i].get_ref_ptr()); - #else +#else r.push_back(_entity_datas[i]); - #endif +#endif } return r; } @@ -351,11 +351,11 @@ int DungeonData::get_voxel_surface_count() const { Vector DungeonData::get_voxel_surfaces() { Vector r; for (int i = 0; i < _voxel_surfaces.size(); i++) { - #if VERSION_MAJOR < 4 +#if VERSION_MAJOR < 4 r.push_back(_voxel_surfaces[i].get_ref_ptr()); - #else +#else r.push_back(_voxel_surfaces[i]); - #endif +#endif } return r; } @@ -394,11 +394,11 @@ int DungeonData::get_liquid_voxel_surface_count() const { Vector DungeonData::get_liquid_voxel_surfaces() { Vector r; for (int i = 0; i < _liquid_voxel_surfaces.size(); i++) { - #if VERSION_MAJOR < 4 +#if VERSION_MAJOR < 4 r.push_back(_liquid_voxel_surfaces[i].get_ref_ptr()); - #else +#else r.push_back(_liquid_voxel_surfaces[i]); - #endif +#endif } return r; } @@ -437,11 +437,11 @@ int DungeonData::get_environment_data_count() const { Vector DungeonData::get_environment_datas() { Vector r; for (int i = 0; i < _environment_datas.size(); i++) { - #if VERSION_MAJOR < 4 +#if VERSION_MAJOR < 4 r.push_back(_environment_datas[i].get_ref_ptr()); - #else +#else r.push_back(_environment_datas[i]); - #endif +#endif } return r; } diff --git a/data/dungeon_room_data.cpp b/data/dungeon_room_data.cpp index 1031eae..386d66f 100644 --- a/data/dungeon_room_data.cpp +++ b/data/dungeon_room_data.cpp @@ -115,11 +115,11 @@ int DungeonRoomData::get_prop_data_count() const { Vector DungeonRoomData::get_prop_datas() { Vector r; for (int i = 0; i < _prop_datas.size(); i++) { - #if VERSION_MAJOR < 4 +#if VERSION_MAJOR < 4 r.push_back(_prop_datas[i].get_ref_ptr()); - #else +#else r.push_back(_prop_datas[i]); - #endif +#endif } return r; } @@ -159,11 +159,11 @@ int DungeonRoomData::get_environment_data_count() const { Vector DungeonRoomData::get_environment_datas() { Vector r; for (int i = 0; i < _environment_datas.size(); i++) { - #if VERSION_MAJOR < 4 +#if VERSION_MAJOR < 4 r.push_back(_environment_datas[i].get_ref_ptr()); - #else +#else r.push_back(_environment_datas[i]); - #endif +#endif } return r; } @@ -202,11 +202,11 @@ int DungeonRoomData::get_voxel_surface_count() const { Vector DungeonRoomData::get_voxel_surfaces() { Vector r; for (int i = 0; i < _voxel_surfaces.size(); i++) { - #if VERSION_MAJOR < 4 +#if VERSION_MAJOR < 4 r.push_back(_voxel_surfaces[i].get_ref_ptr()); - #else +#else r.push_back(_voxel_surfaces[i]); - #endif +#endif } return r; } @@ -245,11 +245,11 @@ int DungeonRoomData::get_liquid_voxel_surface_count() const { Vector DungeonRoomData::get_liquid_voxel_surfaces() { Vector r; for (int i = 0; i < _liquid_voxel_surfaces.size(); i++) { - #if VERSION_MAJOR < 4 +#if VERSION_MAJOR < 4 r.push_back(_liquid_voxel_surfaces[i].get_ref_ptr()); - #else +#else r.push_back(_liquid_voxel_surfaces[i]); - #endif +#endif } return r; } @@ -292,11 +292,11 @@ int DungeonRoomData::get_entity_data_count() const { Vector DungeonRoomData::get_entity_datas() { Vector r; for (int i = 0; i < _entity_datas.size(); i++) { - #if VERSION_MAJOR < 4 +#if VERSION_MAJOR < 4 r.push_back(_entity_datas[i].get_ref_ptr()); - #else +#else r.push_back(_entity_datas[i]); - #endif +#endif } return r; } diff --git a/data/planet_data.cpp b/data/planet_data.cpp index b9200ef..78cb0fa 100644 --- a/data/planet_data.cpp +++ b/data/planet_data.cpp @@ -94,11 +94,11 @@ int PlanetData::get_biome_data_count() const { Vector PlanetData::get_biome_datas() { Vector r; for (int i = 0; i < _biome_datas.size(); i++) { - #if VERSION_MAJOR < 4 +#if VERSION_MAJOR < 4 r.push_back(_biome_datas[i].get_ref_ptr()); - #else +#else r.push_back(_biome_datas[i]); - #endif +#endif } return r; } @@ -138,11 +138,11 @@ int PlanetData::get_environment_data_count() const { Vector PlanetData::get_environment_datas() { Vector r; for (int i = 0; i < _environment_datas.size(); i++) { - #if VERSION_MAJOR < 4 +#if VERSION_MAJOR < 4 r.push_back(_environment_datas[i].get_ref_ptr()); - #else +#else r.push_back(_environment_datas[i]); - #endif +#endif } return r; } @@ -181,11 +181,11 @@ int PlanetData::get_voxel_surface_count() const { Vector PlanetData::get_voxel_surfaces() { Vector r; for (int i = 0; i < _voxel_surfaces.size(); i++) { - #if VERSION_MAJOR < 4 +#if VERSION_MAJOR < 4 r.push_back(_voxel_surfaces[i].get_ref_ptr()); - #else +#else r.push_back(_voxel_surfaces[i]); - #endif +#endif } return r; } @@ -224,11 +224,11 @@ int PlanetData::get_liquid_voxel_surface_count() const { Vector PlanetData::get_liquid_voxel_surfaces() { Vector r; for (int i = 0; i < _liquid_voxel_surfaces.size(); i++) { - #if VERSION_MAJOR < 4 +#if VERSION_MAJOR < 4 r.push_back(_liquid_voxel_surfaces[i].get_ref_ptr()); - #else +#else r.push_back(_liquid_voxel_surfaces[i]); - #endif +#endif } return r; } diff --git a/world_generator.cpp b/world_generator.cpp index 75fe99a..f3b28f6 100644 --- a/world_generator.cpp +++ b/world_generator.cpp @@ -50,11 +50,11 @@ int WorldGenerator::get_planet_data_count() const { Vector WorldGenerator::get_planet_datas() { Vector r; for (int i = 0; i < _planet_datas.size(); i++) { - #if VERSION_MAJOR < 4 +#if VERSION_MAJOR < 4 r.push_back(_planet_datas[i].get_ref_ptr()); - #else +#else r.push_back(_planet_datas[i]); - #endif +#endif } return r; }