diff options
Diffstat (limited to 'xbmc/addons/kodi-addon-dev-kit/include/kodi/AddonBase.h')
| -rw-r--r-- | xbmc/addons/kodi-addon-dev-kit/include/kodi/AddonBase.h | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/AddonBase.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/AddonBase.h index 7abd8e1..42ce2e7 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/AddonBase.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/AddonBase.h | |||
| @@ -1,24 +1,13 @@ | |||
| 1 | #pragma once | ||
| 2 | /* | 1 | /* |
| 3 | * Copyright (C) 2005-2017 Team Kodi | 2 | * Copyright (C) 2005-2018 Team Kodi |
| 4 | * http://kodi.tv | 3 | * This file is part of Kodi - https://kodi.tv |
| 5 | * | ||
| 6 | * This Program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2, or (at your option) | ||
| 9 | * any later version. | ||
| 10 | * | ||
| 11 | * This Program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with Kodi; see the file COPYING. If not, see | ||
| 18 | * <http://www.gnu.org/licenses/>. | ||
| 19 | * | 4 | * |
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 20 | */ | 7 | */ |
| 21 | 8 | ||
| 9 | #pragma once | ||
| 10 | |||
| 22 | #include <stdarg.h> /* va_list, va_start, va_arg, va_end */ | 11 | #include <stdarg.h> /* va_list, va_start, va_arg, va_end */ |
| 23 | #include <cstdlib> | 12 | #include <cstdlib> |
| 24 | #include <cstring> | 13 | #include <cstring> |
| @@ -263,11 +252,11 @@ public: | |||
| 263 | explicit CSettingValue(const void *settingValue) : m_settingValue(settingValue) {} | 252 | explicit CSettingValue(const void *settingValue) : m_settingValue(settingValue) {} |
| 264 | 253 | ||
| 265 | bool empty() const { return (m_settingValue == nullptr) ? true : false; } | 254 | bool empty() const { return (m_settingValue == nullptr) ? true : false; } |
| 266 | std::string GetString() const { return (char*)m_settingValue; } | 255 | std::string GetString() const { return (const char*)m_settingValue; } |
| 267 | int GetInt() const { return *(int*)m_settingValue; } | 256 | int GetInt() const { return *(const int*)m_settingValue; } |
| 268 | unsigned int GetUInt() const { return *(unsigned int*)m_settingValue; } | 257 | unsigned int GetUInt() const { return *(const unsigned int*)m_settingValue; } |
| 269 | bool GetBoolean() const { return *(bool*)m_settingValue; } | 258 | bool GetBoolean() const { return *(const bool*)m_settingValue; } |
| 270 | float GetFloat() const { return *(float*)m_settingValue; } | 259 | float GetFloat() const { return *(const float*)m_settingValue; } |
| 271 | 260 | ||
| 272 | private: | 261 | private: |
| 273 | const void *m_settingValue; | 262 | const void *m_settingValue; |
