From 5a8893aa7aaf06f36c4ec63556f309454dde7763 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 4 Feb 2015 13:16:26 +0000 Subject: [PATCH] Fix harmless unused variable warning in some build configurations. Don't declare the variables if they are not going to be used. Closes #16830. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/richtext/richtextbuffer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index be82f2dfea..77ddd1dbf4 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -8795,12 +8795,12 @@ bool wxRichTextBuffer::SaveFile(wxOutputStream& stream, wxRichTextFileType type) bool wxRichTextBuffer::CopyToClipboard(const wxRichTextRange& range) { bool success = false; +#if wxUSE_CLIPBOARD && wxUSE_DATAOBJ + wxRichTextParagraphLayoutBox* container = this; if (GetRichTextCtrl()) container = GetRichTextCtrl()->GetFocusObject(); -#if wxUSE_CLIPBOARD && wxUSE_DATAOBJ - if (!wxTheClipboard->IsOpened() && wxTheClipboard->Open()) { wxTheClipboard->Clear();