From db0146da06b7db507a510eed7b53aa59905b38ac Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 22 Nov 2013 13:21:30 +0200 Subject: [PATCH] Make BeamGate compile with older GCC versions GCC 4.6 produces ambiguity errors despite the using directive in the class declaration. --- source/libr2c2/beamgate.cpp | 8 ++++---- source/libr2c2/beamgate.h | 4 ---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/source/libr2c2/beamgate.cpp b/source/libr2c2/beamgate.cpp index 698cb45..463a3a9 100644 --- a/source/libr2c2/beamgate.cpp +++ b/source/libr2c2/beamgate.cpp @@ -13,17 +13,17 @@ BeamGate::BeamGate(Layout &l): { invert = true; - layout.add(*this); + TrackAttachment::layout.add(*this); } BeamGate::~BeamGate() { - layout.remove(*this); + TrackAttachment::layout.remove(*this); } BeamGate *BeamGate::clone(Layout *to_layout) const { - BeamGate *gate = new BeamGate(to_layout ? *to_layout : layout); + BeamGate *gate = new BeamGate(to_layout ? *to_layout : TrackAttachment::layout); gate->set_position(position); gate->set_rotation(rotation); return gate; @@ -50,7 +50,7 @@ void BeamGate::set_rotation(const Angle &r) void BeamGate::update_attachment() { - attach_to_closest(100*layout.get_catalogue().get_gauge()); + attach_to_closest(100*TrackAttachment::layout.get_catalogue().get_gauge()); if(track) { diff --git a/source/libr2c2/beamgate.h b/source/libr2c2/beamgate.h index 8a3afe4..bcb4f4d 100644 --- a/source/libr2c2/beamgate.h +++ b/source/libr2c2/beamgate.h @@ -20,10 +20,6 @@ public: void rotation(float); }; -private: - using TrackAttachment::layout; - -public: BeamGate(Layout &); virtual ~BeamGate(); -- 2.43.0