]> git.lyx.org Git - features.git/commitdiff
Fix nullptr warning
authorJuergen Spitzmueller <spitz@lyx.org>
Tue, 15 Dec 2020 07:36:17 +0000 (08:36 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Tue, 15 Dec 2020 07:36:17 +0000 (08:36 +0100)
src/frontends/qt/GuiSpellchecker.cpp

index 009c1247b2a27b8d2110ccc55434eccf45305a6b..fe9471ce6f968aba13eb90b66abb58aa07640af7 100644 (file)
@@ -97,7 +97,7 @@ struct SpellcheckerWidget::Private
        /// test for existing association with a document buffer
        /// and test for already active check
        bool disabled() {
-               return gv_->documentBufferView() == 0 || inCheck();
+               return gv_->documentBufferView() == nullptr || inCheck();
        }
        /// the cursor position of the buffer view
        DocIterator const cursor() const;
@@ -407,7 +407,7 @@ void SpellcheckerWidget::on_languageCO_activated(int index)
 bool SpellcheckerWidget::initialiseParams(std::string const &)
 {
        BufferView * bv = d->gv_->documentBufferView();
-       if (bv == 0)
+       if (bv == nullptr)
                return false;
        std::set<Language const *> langs =
                bv->buffer().masterBuffer()->getLanguages();
@@ -629,7 +629,7 @@ GuiSpellchecker::GuiSpellchecker(GuiView & parent,
 
 GuiSpellchecker::~GuiSpellchecker()
 {
-       setFocusProxy(0);
+       setFocusProxy(nullptr);
        delete widget_;
 }