From c97f1136fa961ade1324057f8c5d0e6a0ba1f0ac Mon Sep 17 00:00:00 2001 From: Kp Date: Tue, 4 Nov 2014 01:20:07 +0000 Subject: [PATCH] Pass AttachSegmentNewAng arg by & --- common/include/editor/editor.h | 1 - similar/editor/group.cpp | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/common/include/editor/editor.h b/common/include/editor/editor.h index d8eb07a06..55129e84c 100644 --- a/common/include/editor/editor.h +++ b/common/include/editor/editor.h @@ -479,7 +479,6 @@ extern char mine_filename[PATH_MAX]; extern char undo_status[10][100]; // group.c -int AttachSegmentNewAng(vms_angvec *pbh); int RotateSegmentNew(vms_angvec *pbh); int rotate_segment_new(vms_angvec *pbh); diff --git a/similar/editor/group.cpp b/similar/editor/group.cpp index 2005717ff..7767b9e94 100644 --- a/similar/editor/group.cpp +++ b/similar/editor/group.cpp @@ -813,7 +813,7 @@ static segnum_t place_new_segment_in_world(void) // ----------------------------------------------------------------------------- // Attach segment in the new-fangled way, which is by using the CopyGroup code. -int AttachSegmentNewAng(vms_angvec *pbh) +static int AttachSegmentNewAng(const vms_angvec &pbh) { int newseg; vms_matrix orient_matrix; @@ -822,7 +822,7 @@ int AttachSegmentNewAng(vms_angvec *pbh) newseg = place_new_segment_in_world(); GroupList[current_group].segments.emplace_back(newseg); - if (!med_move_group(1, Cursegp, Curside, &Segments[newseg], AttachSide, vm_angles_2_matrix(orient_matrix,*pbh),0)) { + if (!med_move_group(1, Cursegp, Curside, &Segments[newseg], AttachSide, vm_angles_2_matrix(orient_matrix,pbh),0)) { autosave_mine(mine_filename); med_propagate_tmaps_to_segments(Cursegp,&Segments[newseg],0); @@ -852,7 +852,7 @@ int AttachSegmentNew(void) pbh.b = 0; pbh.h = 0; - AttachSegmentNewAng(&pbh); + AttachSegmentNewAng(pbh); return 1; }