aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-10-24 11:26:16 (GMT)
committerfluxgen <fluxgen>2002-10-24 11:26:16 (GMT)
commit660f363f1966824d1dbab9985731a1e5142c19c6 (patch)
treea7eba41dcc9a856a5d6ef42146319be2f3853b78
parent5e521b66b776ab08885738f717e22df4963d6bf0 (diff)
downloadfluxbox-660f363f1966824d1dbab9985731a1e5142c19c6.zip
fluxbox-660f363f1966824d1dbab9985731a1e5142c19c6.tar.bz2
fixed assignment issue with gcc 2.95.x and auto_ptr
-rw-r--r--src/Font.cc14
1 files 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 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22//$Id: Font.cc,v 1.16 2002/10/19 14:01:05 fluxgen Exp $ 22//$Id: Font.cc,v 1.17 2002/10/24 11:26:16 fluxgen Exp $
23 23
24 24
25#include "Font.hh" 25#include "Font.hh"
@@ -86,16 +86,16 @@ m_antialias(false) {
86 // antialias is prio 1 86 // antialias is prio 1
87#ifdef USE_XFT 87#ifdef USE_XFT
88 if (antialias) { 88 if (antialias) {
89 m_fontimp = std::auto_ptr<FontImp>(new XftFontImp(0, m_utf8mode)); 89 m_fontimp.reset(std::auto_ptr<FontImp>(new XftFontImp(0, m_utf8mode)).release());
90 m_antialias = true; 90 m_antialias = true;
91 } 91 }
92#endif //USE_XFT 92#endif //USE_XFT
93 // if we didn't create a Xft font then create basic font 93 // if we didn't create a Xft font then create basic font
94 if (m_fontimp.get() == 0) { 94 if (m_fontimp.get() == 0) {
95 if (m_multibyte || m_utf8mode) 95 if (m_multibyte || m_utf8mode)
96 m_fontimp = std::auto_ptr<FontImp>(new XmbFontImp(0, m_utf8mode)); 96 m_fontimp.reset(std::auto_ptr<FontImp>(new XmbFontImp(0, m_utf8mode)).release());
97 else // basic font implementation 97 else // basic font implementation
98 m_fontimp = std::auto_ptr<FontImp>(new XFontImp()); 98 m_fontimp.reset(std::auto_ptr<FontImp>(new XFontImp()).release());
99 } 99 }
100 100
101 if (name != 0) { 101 if (name != 0) {
@@ -112,14 +112,14 @@ void Font::setAntialias(bool flag) {
112 bool loaded = m_fontimp->loaded(); 112 bool loaded = m_fontimp->loaded();
113#ifdef USE_XFT 113#ifdef USE_XFT
114 if (flag && !isAntialias()) { 114 if (flag && !isAntialias()) {
115 m_fontimp = std::auto_ptr<FontImp>(new XftFontImp(m_fontstr.c_str(), m_utf8mode)); 115 m_fontimp.reset(std::auto_ptr<FontImp>(new XftFontImp(m_fontstr.c_str(), m_utf8mode)).release());
116 } else if (!flag && isAntialias()) 116 } else if (!flag && isAntialias())
117#endif // USE_XFT 117#endif // USE_XFT
118 { 118 {
119 if (m_multibyte || m_utf8mode) 119 if (m_multibyte || m_utf8mode)
120 m_fontimp = std::auto_ptr<FontImp>(new XmbFontImp(m_fontstr.c_str(), m_utf8mode)); 120 m_fontimp.reset(std::auto_ptr<FontImp>(new XmbFontImp(m_fontstr.c_str(), m_utf8mode)).release());
121 else { 121 else {
122 m_fontimp = std::auto_ptr<FontImp>(new XFontImp(m_fontstr.c_str())); 122 m_fontimp.reset(std::auto_ptr<FontImp>(new XFontImp(m_fontstr.c_str())).release());
123 } 123 }
124 } 124 }
125 125