Skip to content

Commit

Permalink
Appease clang-3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
jbytheway committed Jun 12, 2020
1 parent 78cb7c1 commit 6d1d88f
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/basecamp.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ extern const std::map<point, direction_data> all_directions;

point direction_from_id( const std::string &id );

const point base_dir;
const point base_dir{};
const std::string prefix = "faction_base_";
const std::string id = "FACTION_CAMP";
const int prefix_len = 13;
Expand Down
2 changes: 1 addition & 1 deletion src/cata_tiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ void tileset_loader::load_tile_spritelists( const JsonObject &entry,
}

struct tile_render_info {
const tripoint pos;
const tripoint pos{};
// accumulator for 3d tallness of sprites rendered here so far;
int height_3d = 0;
lit_level ll;
Expand Down
4 changes: 2 additions & 2 deletions src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3296,7 +3296,7 @@ void game::display_faction_epilogues()
}

struct npc_dist_to_player {
const tripoint ppos;
const tripoint ppos{};
npc_dist_to_player() : ppos( g->u.global_omt_location() ) { }
// Operator overload required to leverage sort API.
bool operator()( const shared_ptr_fast<npc> &a,
Expand Down Expand Up @@ -10849,7 +10849,7 @@ void game::start_hauling( const tripoint &pos )
// Whether the destination is inside a vehicle (not supported)
const bool to_vehicle = false;
// Destination relative to the player
const tripoint relative_destination;
const tripoint relative_destination{};

u.assign_activity( player_activity( move_items_activity_actor(
target_items,
Expand Down
2 changes: 1 addition & 1 deletion src/lightmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ static const efftype_id effect_onfire( "onfire" );
#define LIGHTMAP_CACHE_X MAPSIZE_X
#define LIGHTMAP_CACHE_Y MAPSIZE_Y

static constexpr point lightmap_boundary_min;
static constexpr point lightmap_boundary_min{};
static constexpr point lightmap_boundary_max( LIGHTMAP_CACHE_X, LIGHTMAP_CACHE_Y );

const half_open_rectangle lightmap_boundaries( lightmap_boundary_min, lightmap_boundary_max );
Expand Down
2 changes: 1 addition & 1 deletion src/mapgen_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3074,7 +3074,7 @@ void mapgen_lake_shore( mapgendata &dat )
const int sector_length = SEEX * 2 / 3;

// Define the corners of the map. These won't change.
static constexpr point nw_corner;
static constexpr point nw_corner{};
static constexpr point ne_corner( SEEX * 2 - 1, 0 );
static constexpr point se_corner( SEEX * 2 - 1, SEEY * 2 - 1 );
static constexpr point sw_corner( 0, SEEY * 2 - 1 );
Expand Down
4 changes: 2 additions & 2 deletions src/point.h
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@ struct inclusive_box : box {
}
};

static constexpr tripoint tripoint_zero;
static constexpr point point_zero{ tripoint_zero.xy() };
static constexpr tripoint tripoint_zero{};
static constexpr point point_zero{};

static constexpr point point_north{ 0, -1 };
static constexpr point point_north_east{ 1, -1 };
Expand Down
2 changes: 1 addition & 1 deletion src/scent_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ bool scent_map::inbounds( const tripoint &p ) const
if( !scent_map_z_level_inbounds ) {
return false;
}
static constexpr point scent_map_boundary_min;
static constexpr point scent_map_boundary_min{};
static constexpr point scent_map_boundary_max( MAPSIZE_X, MAPSIZE_Y );

static constexpr half_open_rectangle scent_map_boundaries(
Expand Down
2 changes: 1 addition & 1 deletion src/vehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1810,7 +1810,7 @@ bool vehicle::merge_rackable_vehicle( vehicle *carry_veh, const std::vector<int>

// Now that we have mapped all the parts of the carry vehicle to the vehicle with the rack
// we can go ahead and merge
const point mount_zero;
const point mount_zero{};
if( found_all_parts ) {
decltype( loot_zones ) new_zones;
for( const mapping &carry_map : carry_data ) {
Expand Down
2 changes: 1 addition & 1 deletion tests/overmap_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ TEST_CASE( "default_overmap_generation_always_succeeds", "[slow]" )

TEST_CASE( "default_overmap_generation_has_non_mandatory_specials_at_origin", "[slow]" )
{
const point origin;
const point origin{};

overmap_special mandatory;
overmap_special optional;
Expand Down

0 comments on commit 6d1d88f

Please sign in to comment.