From 0efd29b71bc88303e84f14bdf5c13b6e30dd85e2 Mon Sep 17 00:00:00 2001 From: frosch Date: Wed, 26 Dec 2012 17:43:35 +0000 Subject: (svn r24860) -Codechange: Add SettingDesc::GetType(). --- src/settings.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/settings.cpp') diff --git a/src/settings.cpp b/src/settings.cpp index e1649b269..5a80b9bbd 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -748,6 +748,16 @@ bool SettingDesc::IsEditable(bool do_command) const return true; } +/** + * Return the type of the setting. + * @return type of setting + */ +SettingType SettingDesc::GetType() const +{ + if (this->desc.flags & SGF_PER_COMPANY) return ST_COMPANY; + return (this->save.conv & SLF_NOT_IN_SAVE) ? ST_CLIENT : ST_GAME; +} + /* Begin - Callback Functions for the various settings. */ /** Reposition the main toolbar as the setting changed. */ -- cgit v1.2.3-54-g00ecf