From d550cfe680a7c7c1d1d6f31e94bce2179b81cac4 Mon Sep 17 00:00:00 2001 From: Kp Date: Thu, 13 Dec 2018 02:31:38 +0000 Subject: [PATCH] Remove `struct side` --- common/main/segment.h | 4 ---- similar/main/gameseg.cpp | 4 ++-- similar/main/newdemo.cpp | 8 ++++---- similar/main/render.cpp | 2 +- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/common/main/segment.h b/common/main/segment.h index a2cc9d810..8dcf3f9c1 100644 --- a/common/main/segment.h +++ b/common/main/segment.h @@ -156,10 +156,6 @@ struct unique_side array uvls; }; -struct side : unique_side, shared_side -{ -}; - #ifdef dsx struct shared_segment { diff --git a/similar/main/gameseg.cpp b/similar/main/gameseg.cpp index 7b5e59d93..4d9924669 100644 --- a/similar/main/gameseg.cpp +++ b/similar/main/gameseg.cpp @@ -174,7 +174,7 @@ bool get_side_is_quad(const shared_side &sidep) case SIDE_IS_TRI_13: return false; default: - throw side::illegal_type(sidep); + throw shared_side::illegal_type(sidep); } } @@ -199,7 +199,7 @@ __attribute_cold __noreturn static void create_vertex_list_from_invalid_side(const shared_segment &segp, const shared_side &sidep) { - throw side::illegal_type(segp, sidep); + throw shared_side::illegal_type(segp, sidep); } template diff --git a/similar/main/newdemo.cpp b/similar/main/newdemo.cpp index ff6c886a0..9f6cbb885 100644 --- a/similar/main/newdemo.cpp +++ b/similar/main/newdemo.cpp @@ -1964,8 +1964,8 @@ static void newdemo_pop_ctrlcen_triggers() const auto anim_num = vcwallptr(wall_num)->clip_num; const auto n = WallAnims[anim_num].num_frames; const auto t = WallAnims[anim_num].flags & WCF_TMAP1 - ? &side::tmap_num - : &side::tmap_num2; + ? &unique_side::tmap_num + : &unique_side::tmap_num2; seg->unique_segment::sides[side].*t = csegp->unique_segment::sides[cside].*t = WallAnims[anim_num].frames[n-1]; } } @@ -3048,8 +3048,8 @@ static int newdemo_read_frame_information(int rewrite) const auto &&cside = find_connect_side(segp, csegp); const auto anim_num = vmwallptr(segp->shared_segment::sides[side].wall_num)->clip_num; const auto t = WallAnims[anim_num].flags & WCF_TMAP1 - ? &side::tmap_num - : &side::tmap_num2; + ? &unique_side::tmap_num + : &unique_side::tmap_num2; segp->unique_segment::sides[side].*t = csegp->unique_segment::sides[cside].*t = WallAnims[anim_num].frames[0]; } break; diff --git a/similar/main/render.cpp b/similar/main/render.cpp index 0ce3ee4f7..622425c0f 100644 --- a/similar/main/render.cpp +++ b/similar/main/render.cpp @@ -546,7 +546,7 @@ im_so_ashamed: ; } } else - throw side::illegal_type(segp, sside); + throw shared_side::illegal_type(segp, sside); } }