Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 19, 2010, 2:14:54 AM (14 years ago)
Author:
landauf
Message:

Moved ability to possess descriptions from Executor to ConsoleCommand, since no other executors use this feature. Also simplified this code a little by introducing a new shortcut in Language.h. XMLPort has to use a temporary solution for descriptions without Language support atm.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/consolecommands3/src/libraries/core/Language.h

    r6536 r7186  
    116116
    117117            void addEntry(const LanguageEntryLabel& label, const std::string& entry);
    118             const std::string& getLocalisation(const LanguageEntryLabel& label) const;
     118            const std::string& getLocalisation(const LanguageEntryLabel& label, bool bError = true) const;
    119119
    120120        private:
     
    145145        return Language::getInstance().getLocalisation(label);
    146146    }
     147
     148    //! Shortcut function for Language::getLocalisation without printing an error in case the label doesn't exist
     149    inline const std::string& GetLocalisation_noerror(const LanguageEntryLabel& label)
     150    {
     151        return Language::getInstance().getLocalisation(label, false);
     152    }
    147153}
    148154
Note: See TracChangeset for help on using the changeset viewer.