]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/quicktune_shortcutter.h
Huge LBM lookup performance improvement on mapblock loading (#7195)
[dragonfireclient.git] / src / quicktune_shortcutter.h
index fe1463c936b4b323772933e615b066d2ead4250c..70a7b70b33212a329b0b759c5a29acba0fadfb1a 100644 (file)
@@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
 
-#ifndef QVT_SHORTCUTTER_HEADER
-#define QVT_SHORTCUTTER_HEADER
+#pragma once
 
 #include "quicktune.h"
 
@@ -29,16 +28,16 @@ class QuicktuneShortcutter
        u32 m_selected_i;
        std::string m_message;
 public:
-       bool hasMessage()
+       bool hasMessage() const
        {
-               return m_message != "";
+               return !m_message.empty();
        }
 
        std::string getMessage()
        {
                std::string s = m_message;
                m_message = "";
-               if(s != "")
+               if (!s.empty())
                        return std::string("[quicktune] ") + s;
                return "";
        }
@@ -83,6 +82,3 @@ class QuicktuneShortcutter
                setQuicktuneValue(getSelectedName(), val);
        }
 };
-
-#endif
-