From 2577b55681a97f3eec3fb0e3b5a4fb7f2cb18b8a Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 30 Aug 2018 00:42:04 +0200 Subject: sync with upstream --- .../kodi-addon-dev-kit/include/kodi/AddonBase.h | 33 ++++++++-------------- 1 file changed, 11 insertions(+), 22 deletions(-) (limited to 'xbmc/addons/kodi-addon-dev-kit/include/kodi/AddonBase.h') 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 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kodi; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include /* va_list, va_start, va_arg, va_end */ #include #include @@ -263,11 +252,11 @@ public: explicit CSettingValue(const void *settingValue) : m_settingValue(settingValue) {} bool empty() const { return (m_settingValue == nullptr) ? true : false; } - std::string GetString() const { return (char*)m_settingValue; } - int GetInt() const { return *(int*)m_settingValue; } - unsigned int GetUInt() const { return *(unsigned int*)m_settingValue; } - bool GetBoolean() const { return *(bool*)m_settingValue; } - float GetFloat() const { return *(float*)m_settingValue; } + std::string GetString() const { return (const char*)m_settingValue; } + int GetInt() const { return *(const int*)m_settingValue; } + unsigned int GetUInt() const { return *(const unsigned int*)m_settingValue; } + bool GetBoolean() const { return *(const bool*)m_settingValue; } + float GetFloat() const { return *(const float*)m_settingValue; } private: const void *m_settingValue; -- cgit v1.2.3