From 660f363f1966824d1dbab9985731a1e5142c19c6 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Thu, 24 Oct 2002 11:26:16 +0000 Subject: fixed assignment issue with gcc 2.95.x and auto_ptr --- src/Font.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Font.cc b/src/Font.cc index c86bb84..fcc2e73 100644 --- a/src/Font.cc +++ b/src/Font.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -//$Id: Font.cc,v 1.16 2002/10/19 14:01:05 fluxgen Exp $ +//$Id: Font.cc,v 1.17 2002/10/24 11:26:16 fluxgen Exp $ #include "Font.hh" @@ -86,16 +86,16 @@ m_antialias(false) { // antialias is prio 1 #ifdef USE_XFT if (antialias) { - m_fontimp = std::auto_ptr(new XftFontImp(0, m_utf8mode)); + m_fontimp.reset(std::auto_ptr(new XftFontImp(0, m_utf8mode)).release()); m_antialias = true; } #endif //USE_XFT // if we didn't create a Xft font then create basic font if (m_fontimp.get() == 0) { if (m_multibyte || m_utf8mode) - m_fontimp = std::auto_ptr(new XmbFontImp(0, m_utf8mode)); + m_fontimp.reset(std::auto_ptr(new XmbFontImp(0, m_utf8mode)).release()); else // basic font implementation - m_fontimp = std::auto_ptr(new XFontImp()); + m_fontimp.reset(std::auto_ptr(new XFontImp()).release()); } if (name != 0) { @@ -112,14 +112,14 @@ void Font::setAntialias(bool flag) { bool loaded = m_fontimp->loaded(); #ifdef USE_XFT if (flag && !isAntialias()) { - m_fontimp = std::auto_ptr(new XftFontImp(m_fontstr.c_str(), m_utf8mode)); + m_fontimp.reset(std::auto_ptr(new XftFontImp(m_fontstr.c_str(), m_utf8mode)).release()); } else if (!flag && isAntialias()) #endif // USE_XFT { if (m_multibyte || m_utf8mode) - m_fontimp = std::auto_ptr(new XmbFontImp(m_fontstr.c_str(), m_utf8mode)); + m_fontimp.reset(std::auto_ptr(new XmbFontImp(m_fontstr.c_str(), m_utf8mode)).release()); else { - m_fontimp = std::auto_ptr(new XFontImp(m_fontstr.c_str())); + m_fontimp.reset(std::auto_ptr(new XFontImp(m_fontstr.c_str())).release()); } } -- cgit v0.11.2