From 840c8215b61bd16b9ecd8be10956537e5ced5bce Mon Sep 17 00:00:00 2001 From: historic_bruno Date: Sun, 18 Jan 2015 06:36:15 +0000 Subject: [PATCH] Fixes build error 'no viable conversion' on OS X with clang, libc++ and c++11, refs #2462. Removes explicit use of _Unwrap(), prefer deference operator * instead This was SVN commit r16157. --- .../atlas/GameInterface/Handlers/EnvironmentHandlers.cpp | 4 ++-- source/tools/atlas/GameInterface/Shareable.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/tools/atlas/GameInterface/Handlers/EnvironmentHandlers.cpp b/source/tools/atlas/GameInterface/Handlers/EnvironmentHandlers.cpp index 337343a6bf..200838ebf3 100644 --- a/source/tools/atlas/GameInterface/Handlers/EnvironmentHandlers.cpp +++ b/source/tools/atlas/GameInterface/Handlers/EnvironmentHandlers.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 Wildfire Games. +/* Copyright (C) 2015 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -103,7 +103,7 @@ void SetSettings(const sEnvironmentSettings& s) wm->m_Waviness = s.waterwaviness; wm->m_Murkiness = s.watermurkiness; wm->m_WindAngle = s.windangle; - wm->m_WaterType = s.watertype._Unwrap(); + wm->m_WaterType = *s.watertype; #define COLOUR(A, B) B = CColor(A->r/255.f, A->g/255.f, A->b/255.f, 1.f) COLOUR(s.watercolour, wm->m_WaterColor); diff --git a/source/tools/atlas/GameInterface/Shareable.h b/source/tools/atlas/GameInterface/Shareable.h index 337e44e8ec..5131869ad9 100644 --- a/source/tools/atlas/GameInterface/Shareable.h +++ b/source/tools/atlas/GameInterface/Shareable.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2012 Wildfire Games. +/* Copyright (C) 2015 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -110,7 +110,7 @@ SHAREABLE_PRIMITIVE(void*); Shareable() {} \ Shareable(T const& rhs) { m = rhs; } \ const T* operator->() const { return &m; } \ - operator const T() const { return m; } \ + operator T() const { return m; } \ const T _Unwrap() const { return m; } \ }