Remove default argument for basic_ptridx(magic,array)
This commit is contained in:
parent
ba38214bab
commit
84bd64a14c
|
@ -530,7 +530,13 @@ public:
|
|||
{
|
||||
}
|
||||
template <integral_type v>
|
||||
basic_ptridx(const magic_constant<v> &m, array_managed_type &a = get_array()) :
|
||||
basic_ptridx(const magic_constant<v> &m) :
|
||||
vptr_type(m),
|
||||
vidx_type(m)
|
||||
{
|
||||
}
|
||||
template <integral_type v>
|
||||
basic_ptridx(const magic_constant<v> &m, array_managed_type &a) :
|
||||
vptr_type(m, a),
|
||||
vidx_type(m)
|
||||
{
|
||||
|
@ -642,6 +648,7 @@ template <typename managed_type>
|
|||
template <typename P>
|
||||
class valptridx<managed_type>::basic_vptr_global_factory
|
||||
{
|
||||
using containing_type = valptridx<managed_type>;
|
||||
public:
|
||||
__attribute_warn_unused_result
|
||||
P operator()(typename P::const_pointer_type p) const
|
||||
|
@ -654,10 +661,16 @@ public:
|
|||
return P(p, get_array(p));
|
||||
}
|
||||
__attribute_warn_unused_result
|
||||
P operator()(typename valptridx<managed_type>::index_type i) const
|
||||
P operator()(typename containing_type::index_type i) const
|
||||
{
|
||||
return P(i, get_array());
|
||||
}
|
||||
template <containing_type::integral_type v>
|
||||
__attribute_warn_unused_result
|
||||
P operator()(const containing_type::magic_constant<v> &m) const
|
||||
{
|
||||
return P(m, get_array());
|
||||
}
|
||||
template <typename T>
|
||||
P operator()(T &&) const = delete;
|
||||
void *operator &() const = delete;
|
||||
|
|
|
@ -1480,7 +1480,7 @@ static void test_create_path_many(void)
|
|||
for (i=0; i<Test_size; i++) {
|
||||
Cursegp = segptridx(static_cast<segnum_t>((d_rand() * (Highest_segment_index + 1)) / D_RAND_MAX));
|
||||
Markedsegp = segptridx(static_cast<segnum_t>((d_rand() * (Highest_segment_index + 1)) / D_RAND_MAX));
|
||||
create_path_points(object_first, Cursegp, Markedsegp, point_segs.begin(), &num_points, -1, 0, 0, segment_none);
|
||||
create_path_points(vobjptridx(object_first), Cursegp, Markedsegp, point_segs.begin(), &num_points, -1, 0, 0, segment_none);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1491,7 +1491,7 @@ static void test_create_path(void)
|
|||
array<point_seg, 200> point_segs;
|
||||
short num_points;
|
||||
|
||||
create_path_points(object_first, Cursegp, Markedsegp, point_segs.begin(), &num_points, -1, 0, 0, segment_none);
|
||||
create_path_points(vobjptridx(object_first), Cursegp, Markedsegp, point_segs.begin(), &num_points, -1, 0, 0, segment_none);
|
||||
|
||||
}
|
||||
|
||||
|
@ -1513,7 +1513,7 @@ static void test_create_all_paths(void)
|
|||
const auto &&segp1 = vcsegptr(static_cast<segnum_t>(end_seg));
|
||||
if (segp1->segnum != segment_none)
|
||||
{
|
||||
create_path_points(object_first, start_seg, end_seg, Point_segs_free_ptr, &resultant_length, -1, 0, 0, segment_none);
|
||||
create_path_points(vobjptridx(object_first), start_seg, end_seg, Point_segs_free_ptr, &resultant_length, -1, 0, 0, segment_none);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -763,7 +763,7 @@ int load_mine_data(PHYSFS_file *LoadFile)
|
|||
for (int i=0;i<10;i++)
|
||||
Groupside[i] = mine_editor.Groupside[i];
|
||||
|
||||
Cursegp = mine_editor.current_seg != -1 ? segptridx(static_cast<segnum_t>(mine_editor.current_seg)) : segment_first;
|
||||
Cursegp = mine_editor.current_seg != -1 ? segptridx(static_cast<segnum_t>(mine_editor.current_seg)) : segptridx(segment_first);
|
||||
Markedsegp = mine_editor.Markedsegp != -1 ? segptridx(static_cast<segnum_t>(mine_editor.Markedsegp)) : segment_none;
|
||||
|
||||
num_groups = 0;
|
||||
|
|
|
@ -866,7 +866,7 @@ void init_objects()
|
|||
ConsoleObject = Viewer = &Objects[0];
|
||||
|
||||
init_player_object();
|
||||
obj_link(vobjptridx(ConsoleObject),segment_first); //put in the world in segment 0
|
||||
obj_link(vobjptridx(ConsoleObject), vsegptridx(segment_first)); //put in the world in segment 0
|
||||
num_objects = 1; //just the player
|
||||
Highest_object_index = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue