diff --git a/src/mac/carbon/brush.cpp b/src/mac/carbon/brush.cpp index 4eacf54a31..95bb600893 100644 --- a/src/mac/carbon/brush.cpp +++ b/src/mac/carbon/brush.cpp @@ -129,7 +129,7 @@ void wxBrush::Unshare() { m_refData = new wxBrushRefData(); } - else if (m_refData->GetRefCount() > 1) + else { wxBrushRefData* ref = new wxBrushRefData(*(wxBrushRefData*)m_refData); UnRef(); diff --git a/src/mac/carbon/font.cpp b/src/mac/carbon/font.cpp index 7dced09cc4..52dbecd1ba 100644 --- a/src/mac/carbon/font.cpp +++ b/src/mac/carbon/font.cpp @@ -456,7 +456,7 @@ void wxFont::Unshare() { m_refData = new wxFontRefData(); } - else if (m_refData->GetRefCount() > 1) + else { wxFontRefData* ref = new wxFontRefData(*(wxFontRefData*)m_refData); UnRef(); diff --git a/src/mac/carbon/pen.cpp b/src/mac/carbon/pen.cpp index 59335b457f..7f0acfebe5 100644 --- a/src/mac/carbon/pen.cpp +++ b/src/mac/carbon/pen.cpp @@ -93,7 +93,7 @@ void wxPen::Unshare() { m_refData = new wxPenRefData(); } - else if (m_refData->GetRefCount() > 1) + else { wxPenRefData* ref = new wxPenRefData(*(wxPenRefData*)m_refData); UnRef(); diff --git a/src/msw/font.cpp b/src/msw/font.cpp index 28b938b1a3..397a8c14f0 100644 --- a/src/msw/font.cpp +++ b/src/msw/font.cpp @@ -903,7 +903,7 @@ void wxFont::Unshare() { m_refData = new wxFontRefData(); } - else if (m_refData->GetRefCount() > 1) + else { wxFontRefData* ref = new wxFontRefData(*M_FONTDATA); UnRef(); diff --git a/src/msw/pen.cpp b/src/msw/pen.cpp index 62065284aa..92b08327a6 100644 --- a/src/msw/pen.cpp +++ b/src/msw/pen.cpp @@ -277,7 +277,7 @@ void wxPen::Unshare() { m_refData = new wxPenRefData(); } - else if (m_refData->GetRefCount() > 1) + else { wxPenRefData* ref = new wxPenRefData(*(wxPenRefData*)m_refData); UnRef();