From d3c46d246d932849ffb6641427b1278a9d4cd75b Mon Sep 17 00:00:00 2001 From: "Chris \"Koying\" Browet" Date: Sun, 21 Dec 2014 19:22:06 +0100 Subject: [PATCH] CHG: Move to c++11 and use std:shared_ptr rather than boost Fixes the Nexus Player x86 crashes --- configure.in | 4 +- m4/ax_cxx_compile_stdcxx_11.m4 | 142 +++++++++++++++++ xbmc/Application.cpp | 4 +- xbmc/Application.h | 4 +- xbmc/ApplicationMessenger.cpp | 6 +- xbmc/ApplicationMessenger.h | 4 +- xbmc/ApplicationPlayer.cpp | 146 +++++++++--------- xbmc/ApplicationPlayer.h | 6 +- xbmc/BackgroundInfoLoader.h | 4 +- xbmc/CueDocument.cpp | 2 + xbmc/FileItem.cpp | 5 +- xbmc/FileItem.h | 8 +- xbmc/GUIInfoManager.cpp | 15 +- xbmc/GUIInfoManager.h | 2 +- xbmc/GUILargeTextureManager.cpp | 2 + xbmc/LangInfo.cpp | 2 + xbmc/NfoFile.cpp | 4 +- xbmc/PartyModeManager.h | 4 +- xbmc/PlayListPlayer.cpp | 2 +- xbmc/PlayListPlayer.h | 4 +- xbmc/XBDateTime.cpp | 2 + xbmc/addons/AddonInstaller.cpp | 6 +- xbmc/addons/AddonManager.cpp | 4 +- xbmc/addons/GUIWindowAddonBrowser.cpp | 2 +- xbmc/addons/IAddon.h | 14 +- xbmc/addons/Repository.cpp | 2 +- xbmc/addons/Repository.h | 2 +- xbmc/addons/Scraper.cpp | 1 + xbmc/addons/Scraper.h | 2 +- xbmc/addons/Service.cpp | 4 +- xbmc/addons/Skin.cpp | 2 +- xbmc/addons/Skin.h | 2 +- xbmc/cdrip/CDDARipJob.cpp | 6 +- xbmc/cdrip/CDDARipper.cpp | 2 +- xbmc/cdrip/Encoder.cpp | 2 +- xbmc/cdrip/Encoder.h | 6 +- xbmc/cores/AudioEngine/AESinkFactory.cpp | 2 + .../AudioEngine/Encoders/AEEncoderFFmpeg.cpp | 1 + .../Engines/ActiveAE/ActiveAEResamplePi.cpp | 1 + .../Engines/ActiveAE/ActiveAESink.cpp | 1 + xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp | 1 + .../AudioEngine/Sinks/AESinkDirectSound.cpp | 2 + xbmc/cores/AudioEngine/Sinks/AESinkPi.cpp | 1 + xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp | 1 + .../cores/AudioEngine/Utils/AEChannelInfo.cpp | 1 + xbmc/cores/AudioEngine/Utils/AEStreamInfo.cpp | 1 + xbmc/cores/AudioEngine/Utils/AEUtil.cpp | 2 + xbmc/cores/DllLoader/DllLoader.cpp | 3 + xbmc/cores/VideoRenderers/DXVA.cpp | 5 +- .../Audio/DVDAudioCodecPassthrough.cpp | 2 + .../dvdplayer/DVDCodecs/Overlay/DVDOverlay.h | 2 +- .../Video/DVDVideoCodecAndroidMediaCodec.cpp | 18 ++- .../Video/DVDVideoCodecAndroidMediaCodec.h | 20 +-- .../DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp | 4 +- .../DVDCodecs/Video/DVDVideoCodecIMX.cpp | 2 + xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp | 2 +- .../dvdplayer/DVDCodecs/Video/MMALCodec.h | 4 +- xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h | 1 + .../StageFrightVideoPrivate.h | 8 + .../dvdplayer/DVDDemuxers/DVDDemuxCC.cpp | 2 + .../dvdplayer/DVDDemuxers/DVDDemuxPVRClient.h | 2 +- .../DVDDemuxers/DVDFactoryDemuxer.cpp | 2 +- xbmc/cores/dvdplayer/DVDFileInfo.cpp | 2 + .../DVDInputStreams/DVDInputStream.h | 2 +- .../DVDInputStreams/DVDInputStreamBluray.cpp | 2 + .../DVDInputStreams/DVDInputStreamBluray.h | 4 +- .../DVDInputStreams/DVDInputStreamStack.cpp | 1 - .../DVDInputStreams/DVDInputStreamStack.h | 4 +- xbmc/cores/dvdplayer/DVDMessage.cpp | 1 + xbmc/cores/dvdplayer/DVDMessageQueue.h | 1 + xbmc/cores/paplayer/NSFCodec.cpp | 1 + xbmc/dbwrappers/DatabaseQuery.cpp | 4 +- xbmc/dbwrappers/DatabaseQuery.h | 6 +- xbmc/dbwrappers/mysqldataset.cpp | 1 + xbmc/dialogs/GUIDialogBusy.cpp | 6 +- xbmc/dialogs/GUIDialogSmartPlaylistEditor.cpp | 4 +- xbmc/epg/EpgDatabase.cpp | 1 + xbmc/epg/EpgInfoTag.h | 4 +- xbmc/epg/GUIEPGGridContainer.cpp | 2 +- xbmc/filesystem/AddonsDirectory.cpp | 6 +- xbmc/filesystem/AddonsDirectory.h | 2 +- xbmc/filesystem/BlurayDirectory.cpp | 2 + xbmc/filesystem/CDDAFile.cpp | 2 + xbmc/filesystem/CDDAFile.h | 2 +- xbmc/filesystem/CacheStrategy.cpp | 3 + xbmc/filesystem/CircularCache.cpp | 1 + xbmc/filesystem/CurlFile.cpp | 1 + xbmc/filesystem/Directory.cpp | 14 +- xbmc/filesystem/DirectoryCache.cpp | 2 + xbmc/filesystem/DirectoryHistory.cpp | 2 + xbmc/filesystem/FileCache.cpp | 3 + xbmc/filesystem/HTSPDirectory.cpp | 2 + xbmc/filesystem/HTSPDirectory.h | 4 +- xbmc/filesystem/SFTPFile.h | 4 +- xbmc/filesystem/SMBFile.cpp | 4 +- xbmc/filesystem/SpecialProtocol.cpp | 1 + xbmc/filesystem/ZeroconfDirectory.cpp | 1 + xbmc/filesystem/iso9660.cpp | 1 + xbmc/filesystem/win32/Win32Directory.cpp | 2 + xbmc/filesystem/win32/Win32File.cpp | 1 + xbmc/filesystem/win32/Win32SMBDirectory.cpp | 2 + xbmc/filesystem/win32/Win32SMBFile.cpp | 1 + xbmc/guilib/DDSImage.cpp | 1 + xbmc/guilib/GUIBaseContainer.cpp | 4 +- xbmc/guilib/GUIControlGroup.cpp | 2 + xbmc/guilib/GUIFontCache.h | 4 +- xbmc/guilib/GUIFontTTF.cpp | 8 +- xbmc/guilib/GUIImage.cpp | 2 + xbmc/guilib/GUIMessage.h | 4 +- xbmc/guilib/GUIPanelContainer.cpp | 2 + xbmc/guilib/GUIStaticItem.h | 2 +- xbmc/guilib/GUITextureGLES.cpp | 2 + xbmc/guilib/GUIVisualisationControl.cpp | 2 +- xbmc/guilib/GUIWindow.h | 4 +- xbmc/guilib/IGUIContainer.h | 4 +- xbmc/guilib/VisibleEffect.cpp | 28 ++-- xbmc/guilib/VisibleEffect.h | 10 +- xbmc/input/ButtonTranslator.cpp | 11 +- xbmc/input/ButtonTranslator.h | 8 +- xbmc/input/KeyboardLayout.cpp | 1 + xbmc/input/SDLJoystick.cpp | 1 - xbmc/input/SDLJoystick.h | 2 +- xbmc/input/windows/WINJoystick.cpp | 2 +- xbmc/input/windows/WINJoystick.h | 2 +- xbmc/interfaces/Builtins.cpp | 2 +- .../generic/ScriptInvocationManager.h | 4 +- xbmc/interfaces/info/InfoBool.h | 4 +- xbmc/interfaces/info/InfoExpression.cpp | 20 ++- xbmc/interfaces/info/InfoExpression.h | 4 +- xbmc/interfaces/json-rpc/AddonsOperations.cpp | 2 +- .../json-rpc/JSONServiceDescription.h | 4 +- xbmc/interfaces/json-rpc/PlayerOperations.h | 2 +- xbmc/interfaces/legacy/ListItem.cpp | 1 + xbmc/interfaces/legacy/Monitor.cpp | 1 + xbmc/interfaces/python/XBPython.h | 2 +- xbmc/linux/DBusReserve.cpp | 1 + xbmc/linux/LinuxTimezone.cpp | 2 + xbmc/linux/PosixMountProvider.cpp | 3 + xbmc/linux/XFileUtils.cpp | 2 +- xbmc/linux/XHandle.cpp | 2 + xbmc/listproviders/DirectoryProvider.cpp | 13 +- xbmc/listproviders/IListProvider.h | 4 +- xbmc/listproviders/StaticProvider.cpp | 2 +- xbmc/music/Album.cpp | 2 + xbmc/music/Artist.cpp | 2 + xbmc/music/MusicDatabase.cpp | 6 +- xbmc/music/infoscanner/MusicInfoScanner.cpp | 4 +- xbmc/music/karaoke/karaokelyricstextustar.cpp | 1 + xbmc/music/tags/MusicInfoTagLoaderASAP.cpp | 1 + xbmc/music/tags/MusicInfoTagLoaderSPC.cpp | 1 + xbmc/music/windows/GUIWindowMusicNav.cpp | 2 +- xbmc/network/EventServer.cpp | 1 + xbmc/network/WebServer.cpp | 7 +- xbmc/network/ZeroconfBrowser.cpp | 1 + xbmc/network/linux/NetworkLinux.cpp | 2 + xbmc/network/linux/ZeroconfAvahi.h | 4 +- xbmc/network/upnp/UPnPInternal.cpp | 2 + xbmc/pictures/Picture.cpp | 2 + xbmc/pictures/PictureInfoTag.cpp | 3 + xbmc/playlists/PlayList.cpp | 3 + xbmc/playlists/PlayList.h | 4 +- xbmc/playlists/SmartPlayList.cpp | 6 +- xbmc/playlists/SmartPlayList.h | 2 +- xbmc/pvr/PVRGUIInfo.h | 2 +- xbmc/pvr/PVRManager.h | 4 +- xbmc/pvr/addons/PVRClient.h | 2 +- xbmc/pvr/addons/PVRClients.cpp | 2 +- xbmc/pvr/addons/PVRClients.h | 2 +- xbmc/pvr/channels/PVRChannel.h | 6 +- xbmc/pvr/channels/PVRChannelGroup.h | 4 +- xbmc/pvr/dialogs/GUIDialogPVRGuideInfo.h | 4 +- xbmc/pvr/recordings/PVRRecording.h | 2 +- xbmc/pvr/timers/PVRTimerInfoTag.h | 8 +- xbmc/settings/SettingUtils.cpp | 4 +- xbmc/settings/SettingUtils.h | 6 +- xbmc/settings/Settings.h | 2 +- .../dialogs/GUIDialogContentSettings.cpp | 6 +- xbmc/settings/dialogs/GUIDialogSettingsBase.h | 2 +- xbmc/settings/lib/Setting.h | 4 +- xbmc/settings/lib/SettingDependency.cpp | 4 +- xbmc/settings/lib/SettingDependency.h | 4 +- xbmc/settings/lib/SettingsManager.cpp | 7 +- xbmc/settings/lib/SettingsManager.h | 4 +- xbmc/storage/DetectDVDType.h | 4 +- xbmc/storage/MediaManager.cpp | 2 +- .../android/AndroidStorageProvider.cpp | 9 +- xbmc/storage/cdioSupport.cpp | 6 +- xbmc/storage/cdioSupport.h | 8 +- xbmc/utils/Archive.cpp | 1 + xbmc/utils/BooleanLogic.h | 6 +- xbmc/utils/CPUInfo.cpp | 2 + xbmc/utils/CharsetConverter.cpp | 1 + xbmc/utils/Fanart.cpp | 3 + xbmc/utils/GlobalsHandling.h | 18 +-- xbmc/utils/HttpRangeUtils.cpp | 2 + xbmc/utils/JobManager.cpp | 2 +- xbmc/utils/LabelFormatter.cpp | 4 + xbmc/utils/Observer.cpp | 2 + xbmc/utils/SortUtils.cpp | 2 + xbmc/utils/SortUtils.h | 4 +- xbmc/utils/StringUtils.cpp | 1 + xbmc/utils/URIUtils.cpp | 1 + xbmc/utils/test/TestGlobalsHandling.cpp | 2 +- xbmc/video/VideoDatabase.cpp | 6 +- xbmc/video/VideoInfoTag.cpp | 1 + xbmc/video/VideoThumbLoader.cpp | 2 + xbmc/video/dialogs/GUIDialogVideoInfo.cpp | 2 +- xbmc/view/GUIViewState.cpp | 2 +- xbmc/win32/pch.h | 2 +- xbmc/windowing/android/WinEventsAndroid.cpp | 2 +- xbmc/windowing/egl/EGLNativeTypeIMX.cpp | 2 + xbmc/windows/GUIMediaWindow.cpp | 4 +- xbmc/windows/GUIWindowScreensaver.cpp | 2 +- xbmc/windows/GUIWindowScreensaver.h | 2 +- 214 files changed, 673 insertions(+), 379 deletions(-) create mode 100644 m4/ax_cxx_compile_stdcxx_11.m4 diff --git a/configure.in b/configure.in index 121f41c9a6d48..0f9cda70012e8 100644 --- a/configure.in +++ b/configure.in @@ -7,6 +7,7 @@ AC_CONFIG_HEADERS([xbmc/config.h]) AH_TOP([#pragma once]) m4_include([m4/ax_prog_cc_for_build.m4]) m4_include([m4/ax_prog_cxx_for_build.m4]) +m4_include([m4/ax_cxx_compile_stdcxx_11.m4]) m4_include([m4/ax_python_devel.m4]) m4_include([m4/xbmc_arch.m4]) @@ -579,6 +580,7 @@ PASSED_CXXFLAGS=$CXXFLAGS # Hack to override autoconf default values AC_PROG_CXX AX_PROG_CXX_FOR_BUILD CXXFLAGS="$PASSED_CXXFLAGS $DEFAULT_COMPILE_FLAGS" +AX_CXX_COMPILE_STDCXX_11(,[optional]) AC_PROG_LIBTOOL AC_PROG_AWK AC_PROG_LN_S @@ -928,7 +930,7 @@ AC_CHECK_HEADER([sys/inotify.h], AC_DEFINE([HAVE_INOTIFY],[1],[Define if we have # Checks for boost headers using CXX instead of CC AC_LANG_PUSH([C++]) -AC_CHECK_HEADER([boost/shared_ptr.hpp],, AC_MSG_ERROR($missing_library)) +AC_CHECK_HEADER([boost/circular_buffer.hpp],, AC_MSG_ERROR($missing_library)) AC_LANG_POP([C++]) # Python diff --git a/m4/ax_cxx_compile_stdcxx_11.m4 b/m4/ax_cxx_compile_stdcxx_11.m4 new file mode 100644 index 0000000000000..2bc054d981628 --- /dev/null +++ b/m4/ax_cxx_compile_stdcxx_11.m4 @@ -0,0 +1,142 @@ +# ============================================================================ +# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html +# ============================================================================ +# +# SYNOPSIS +# +# AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional]) +# +# DESCRIPTION +# +# Check for baseline language coverage in the compiler for the C++11 +# standard; if necessary, add switches to CXXFLAGS to enable support. +# +# The first argument, if specified, indicates whether you insist on an +# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. +# -std=c++11). If neither is specified, you get whatever works, with +# preference for an extended mode. +# +# The second argument, if specified 'mandatory' or if left unspecified, +# indicates that baseline C++11 support is required and that the macro +# should error out if no mode with that support is found. If specified +# 'optional', then configuration proceeds regardless, after defining +# HAVE_CXX11 if and only if a supporting mode is found. +# +# LICENSE +# +# Copyright (c) 2008 Benjamin Kosnik +# Copyright (c) 2012 Zack Weinberg +# Copyright (c) 2013 Roy Stogner +# Copyright (c) 2014 Alexey Sokolov +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 4 + +m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[ + template + struct check + { + static_assert(sizeof(int) <= sizeof(T), "not big enough"); + }; + + struct Base { + virtual void f() {} + }; + struct Child : public Base { + virtual void f() {} + }; + + typedef check> right_angle_brackets; + + int a; + decltype(a) b; + + typedef check check_type; + check_type c; + check_type&& cr = static_cast(c); + + auto d = a; + auto l = [](){}; +]]) + +AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl + m4_if([$1], [], [], + [$1], [ext], [], + [$1], [noext], [], + [m4_fatal([invalid argument `$1' to AX_CXX_COMPILE_STDCXX_11])])dnl + m4_if([$2], [], [ax_cxx_compile_cxx11_required=true], + [$2], [mandatory], [ax_cxx_compile_cxx11_required=true], + [$2], [optional], [ax_cxx_compile_cxx11_required=false], + [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX_11])]) + AC_LANG_PUSH([C++])dnl + ac_success=no + AC_CACHE_CHECK(whether $CXX supports C++11 features by default, + ax_cv_cxx_compile_cxx11, + [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], + [ax_cv_cxx_compile_cxx11=yes], + [ax_cv_cxx_compile_cxx11=no])]) + if test x$ax_cv_cxx_compile_cxx11 = xyes; then + ac_success=yes + fi + + m4_if([$1], [noext], [], [dnl + if test x$ac_success = xno; then + for switch in -std=gnu++11 -std=gnu++0x; do + cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) + AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, + $cachevar, + [ac_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS $switch" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], + [eval $cachevar=yes], + [eval $cachevar=no]) + CXXFLAGS="$ac_save_CXXFLAGS"]) + if eval test x\$$cachevar = xyes; then + CXXFLAGS="$CXXFLAGS $switch" + ac_success=yes + break + fi + done + fi]) + + m4_if([$1], [ext], [], [dnl + if test x$ac_success = xno; then + for switch in -std=c++11 -std=c++0x; do + cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) + AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, + $cachevar, + [ac_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS $switch" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], + [eval $cachevar=yes], + [eval $cachevar=no]) + CXXFLAGS="$ac_save_CXXFLAGS"]) + if eval test x\$$cachevar = xyes; then + CXXFLAGS="$CXXFLAGS $switch" + ac_success=yes + break + fi + done + fi]) + AC_LANG_POP([C++]) + if test x$ax_cxx_compile_cxx11_required = xtrue; then + if test x$ac_success = xno; then + AC_MSG_ERROR([*** A compiler with support for C++11 language features is required.]) + fi + else + if test x$ac_success = xno; then + HAVE_CXX11=0 + AC_MSG_NOTICE([No compiler with C++11 support was found]) + else + HAVE_CXX11=1 + AC_DEFINE(HAVE_CXX11,1, + [define if the compiler supports basic C++11 syntax]) + fi + + AC_SUBST(HAVE_CXX11) + fi +]) diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp index b66f739434f3f..3234480980f4c 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -1696,7 +1696,7 @@ bool CApplication::LoadSkin(const std::string& skinID) AddonPtr addon; if (CAddonMgr::Get().GetAddon(skinID, addon, ADDON_SKIN)) { - if (LoadSkin(boost::dynamic_pointer_cast(addon))) + if (LoadSkin(std::dynamic_pointer_cast(addon))) return true; } CLog::Log(LOGERROR, "failed to load requested skin '%s'", skinID.c_str()); @@ -1852,7 +1852,7 @@ void CApplication::UnloadSkin(bool forReload /* = false */) g_infoManager.Clear(); -// The g_SkinInfo boost shared_ptr ought to be reset here +// The g_SkinInfo shared_ptr ought to be reset here // but there are too many places it's used without checking for NULL // and as a result a race condition on exit can cause a crash. } diff --git a/xbmc/Application.h b/xbmc/Application.h index b7d9308276be5..053f428c7afb2 100644 --- a/xbmc/Application.h +++ b/xbmc/Application.h @@ -37,7 +37,7 @@ namespace ADDON { class CSkinInfo; class IAddon; - typedef boost::shared_ptr AddonPtr; + typedef std::shared_ptr AddonPtr; } namespace MEDIA_DETECT @@ -408,7 +408,7 @@ class CApplication : public CXBApplicationEx, public IPlayerCallback, public IMs virtual bool OnSettingUpdate(CSetting* &setting, const char *oldSettingId, const TiXmlNode *oldSettingNode); bool LoadSkin(const std::string& skinID); - bool LoadSkin(const boost::shared_ptr& skin); + bool LoadSkin(const std::shared_ptr& skin); /*! \brief Delegates the action to all registered action handlers. diff --git a/xbmc/ApplicationMessenger.cpp b/xbmc/ApplicationMessenger.cpp index 344886b51f102..d698b02a06c4f 100644 --- a/xbmc/ApplicationMessenger.cpp +++ b/xbmc/ApplicationMessenger.cpp @@ -144,7 +144,7 @@ void CApplicationMessenger::Cleanup() void CApplicationMessenger::SendMessage(ThreadMessage& message, bool wait) { message.waitEvent.reset(); - boost::shared_ptr waitEvent; + std::shared_ptr waitEvent; if (wait) { // check that we're not being called from our application thread, else we'll be waiting // forever! @@ -212,7 +212,7 @@ void CApplicationMessenger::ProcessMessages() //Leave here as the message might make another //thread call processmessages or sendmessage - boost::shared_ptr waitEvent = pMsg->waitEvent; + std::shared_ptr waitEvent = pMsg->waitEvent; lock.Leave(); // <- see the large comment in SendMessage ^ ProcessMessage(pMsg); @@ -879,7 +879,7 @@ void CApplicationMessenger::ProcessWindowMessages() // leave here in case we make more thread messages from this one - boost::shared_ptr waitEvent = pMsg->waitEvent; + std::shared_ptr waitEvent = pMsg->waitEvent; lock.Leave(); // <- see the large comment in SendMessage ^ ProcessMessage(pMsg); diff --git a/xbmc/ApplicationMessenger.h b/xbmc/ApplicationMessenger.h index dc629b5052da6..36c90e403c0cd 100644 --- a/xbmc/ApplicationMessenger.h +++ b/xbmc/ApplicationMessenger.h @@ -22,7 +22,7 @@ #include "guilib/WindowIDs.h" #include "threads/Thread.h" -#include +#include #include #include "utils/GlobalsHandling.h" @@ -121,7 +121,7 @@ typedef struct int param2; std::string strParam; std::vector params; - boost::shared_ptr waitEvent; + std::shared_ptr waitEvent; void* lpVoid; } ThreadMessage; diff --git a/xbmc/ApplicationPlayer.cpp b/xbmc/ApplicationPlayer.cpp index 5db9f17f01c48..15a3241713621 100644 --- a/xbmc/ApplicationPlayer.cpp +++ b/xbmc/ApplicationPlayer.cpp @@ -29,7 +29,7 @@ CApplicationPlayer::CApplicationPlayer() m_eCurrentPlayer = EPC_NONE; } -boost::shared_ptr CApplicationPlayer::GetInternal() const +std::shared_ptr CApplicationPlayer::GetInternal() const { CSingleLock lock(m_player_lock); return m_pPlayer; @@ -37,7 +37,7 @@ boost::shared_ptr CApplicationPlayer::GetInternal() const void CApplicationPlayer::ClosePlayer() { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) { CloseFile(); @@ -49,7 +49,7 @@ void CApplicationPlayer::ClosePlayer() void CApplicationPlayer::CloseFile(bool reopen) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) { ++m_iPlayerOPSeq; @@ -59,7 +59,7 @@ void CApplicationPlayer::CloseFile(bool reopen) void CApplicationPlayer::ClosePlayerGapless(PLAYERCOREID newCore) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (!player) return; @@ -92,7 +92,7 @@ void CApplicationPlayer::CreatePlayer(PLAYERCOREID newCore, IPlayerCallback& cal PlayBackRet CApplicationPlayer::OpenFile(const CFileItem& item, const CPlayerOptions& options) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); PlayBackRet iResult = PLAYBACK_FAIL; if (player) { @@ -109,13 +109,13 @@ PlayBackRet CApplicationPlayer::OpenFile(const CFileItem& item, const CPlayerOpt bool CApplicationPlayer::HasPlayer() const { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); return player != NULL; } int CApplicationPlayer::GetChapter() { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) return player->GetChapter(); else @@ -124,7 +124,7 @@ int CApplicationPlayer::GetChapter() int CApplicationPlayer::GetChapterCount() { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) return player->GetChapterCount(); else @@ -133,32 +133,32 @@ int CApplicationPlayer::GetChapterCount() void CApplicationPlayer::GetChapterName(std::string& strChapterName) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) player->GetChapterName(strChapterName); } bool CApplicationPlayer::HasAudio() const { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); return (player && player->HasAudio()); } bool CApplicationPlayer::HasVideo() const { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); return (player && player->HasVideo()); } bool CApplicationPlayer::IsPaused() const { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); return (player && player->IsPaused()); } bool CApplicationPlayer::IsPlaying() const { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); return (player && player->IsPlaying()); } @@ -179,73 +179,73 @@ bool CApplicationPlayer::IsPlayingVideo() const void CApplicationPlayer::Pause() { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) player->Pause(); } bool CApplicationPlayer::ControlsVolume() const { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); return (player && player->ControlsVolume()); } void CApplicationPlayer::SetMute(bool bOnOff) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) player->SetMute(bOnOff); } void CApplicationPlayer::SetVolume(float volume) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) player->SetVolume(volume); } void CApplicationPlayer::Seek(bool bPlus, bool bLargeStep, bool bChapterOverride) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) player->Seek(bPlus, bLargeStep, bChapterOverride); } void CApplicationPlayer::SeekPercentage(float fPercent) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) player->SeekPercentage(fPercent); } bool CApplicationPlayer::IsPassthrough() const { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); return (player && player->IsPassthrough()); } bool CApplicationPlayer::CanSeek() { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); return (player && player->CanSeek()); } bool CApplicationPlayer::SeekScene(bool bPlus) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); return (player && player->SeekScene(bPlus)); } void CApplicationPlayer::SeekTime(int64_t iTime) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) player->SeekTime(iTime); } std::string CApplicationPlayer::GetPlayingTitle() { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) return player->GetPlayingTitle(); else @@ -254,7 +254,7 @@ std::string CApplicationPlayer::GetPlayingTitle() int64_t CApplicationPlayer::GetTime() const { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) return player->GetTime(); else @@ -263,25 +263,25 @@ int64_t CApplicationPlayer::GetTime() const bool CApplicationPlayer::IsCaching() const { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); return (player && player->IsCaching()); } bool CApplicationPlayer::IsInMenu() const { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); return (player && player->IsInMenu()); } bool CApplicationPlayer::HasMenu() const { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); return (player && player->HasMenu()); } int CApplicationPlayer::GetCacheLevel() const { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) return player->GetCacheLevel(); else @@ -290,7 +290,7 @@ int CApplicationPlayer::GetCacheLevel() const int CApplicationPlayer::GetSubtitleCount() { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) return player->GetSubtitleCount(); else @@ -302,7 +302,7 @@ int CApplicationPlayer::GetAudioStream() if (!m_audioStreamUpdate.IsTimePast()) return m_iAudioStream; - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) { m_iAudioStream = player->GetAudioStream(); @@ -318,7 +318,7 @@ int CApplicationPlayer::GetSubtitle() if (!m_subtitleStreamUpdate.IsTimePast()) return m_iSubtitleStream; - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) { m_iSubtitleStream = player->GetSubtitle(); @@ -331,31 +331,31 @@ int CApplicationPlayer::GetSubtitle() bool CApplicationPlayer::GetSubtitleVisible() { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); return (player && player->GetSubtitleVisible()); } bool CApplicationPlayer::CanRecord() { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); return (player && player->CanRecord()); } bool CApplicationPlayer::CanPause() { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); return (player && player->CanPause()); } bool CApplicationPlayer::IsRecording() const { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); return (player && player->IsRecording()); } TextCacheStruct_t* CApplicationPlayer::GetTeletextCache() { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) return player->GetTeletextCache(); else @@ -364,7 +364,7 @@ TextCacheStruct_t* CApplicationPlayer::GetTeletextCache() int64_t CApplicationPlayer::GetTotalTime() const { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) return player->GetTotalTime(); else @@ -373,7 +373,7 @@ int64_t CApplicationPlayer::GetTotalTime() const float CApplicationPlayer::GetPercentage() const { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) return player->GetPercentage(); else @@ -382,7 +382,7 @@ float CApplicationPlayer::GetPercentage() const float CApplicationPlayer::GetCachePercentage() const { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) return player->GetCachePercentage(); else @@ -391,21 +391,21 @@ float CApplicationPlayer::GetCachePercentage() const void CApplicationPlayer::ToFFRW(int iSpeed) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) player->ToFFRW(iSpeed); } void CApplicationPlayer::DoAudioWork() { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) player->DoAudioWork(); } std::string CApplicationPlayer::GetPlayerState() { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) return player->GetPlayerState(); else @@ -414,58 +414,58 @@ std::string CApplicationPlayer::GetPlayerState() bool CApplicationPlayer::QueueNextFile(const CFileItem &file) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); return (player && player->QueueNextFile(file)); } bool CApplicationPlayer::GetStreamDetails(CStreamDetails &details) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); return (player && player->GetStreamDetails(details)); } bool CApplicationPlayer::SetPlayerState(const std::string& state) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); return (player && player->SetPlayerState(state)); } void CApplicationPlayer::OnNothingToQueueNotify() { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) player->OnNothingToQueueNotify(); } void CApplicationPlayer::GetVideoStreamInfo(SPlayerVideoStreamInfo &info) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) player->GetVideoStreamInfo(info); } void CApplicationPlayer::GetAudioStreamInfo(int index, SPlayerAudioStreamInfo &info) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) player->GetAudioStreamInfo(index, info); } bool CApplicationPlayer::OnAction(const CAction &action) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); return (player && player->OnAction(action)); } bool CApplicationPlayer::Record(bool bOnOff) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); return (player && player->Record(bOnOff)); } int CApplicationPlayer::GetAudioStreamCount() { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) return player->GetAudioStreamCount(); else @@ -474,7 +474,7 @@ int CApplicationPlayer::GetAudioStreamCount() void CApplicationPlayer::SetAudioStream(int iStream) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) { player->SetAudioStream(iStream); @@ -486,14 +486,14 @@ void CApplicationPlayer::SetAudioStream(int iStream) void CApplicationPlayer::GetSubtitleStreamInfo(int index, SPlayerSubtitleStreamInfo &info) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) player->GetSubtitleStreamInfo(index, info); } void CApplicationPlayer::SetSubtitle(int iStream) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) { player->SetSubtitle(iStream); @@ -505,7 +505,7 @@ void CApplicationPlayer::SetSubtitle(int iStream) void CApplicationPlayer::SetSubtitleVisible(bool bVisible) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) { player->SetSubtitleVisible(bVisible); @@ -516,7 +516,7 @@ void CApplicationPlayer::SetSubtitleVisible(bool bVisible) int CApplicationPlayer::AddSubtitle(const std::string& strSubPath) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) return player->AddSubtitle(strSubPath); else @@ -525,76 +525,76 @@ int CApplicationPlayer::AddSubtitle(const std::string& strSubPath) void CApplicationPlayer::SetSubTitleDelay(float fValue) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) player->SetSubTitleDelay(fValue); } void CApplicationPlayer::SetAVDelay(float fValue) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) player->SetAVDelay(fValue); } void CApplicationPlayer::SetDynamicRangeCompression(long drc) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) player->SetDynamicRangeCompression(drc); } bool CApplicationPlayer::SwitchChannel(PVR::CPVRChannel &channel) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); return (player && player->SwitchChannel(channel)); } void CApplicationPlayer::LoadPage(int p, int sp, unsigned char* buffer) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) player->LoadPage(p, sp, buffer); } void CApplicationPlayer::GetAudioCapabilities(std::vector &audioCaps) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) player->GetAudioCapabilities(audioCaps); } void CApplicationPlayer::GetSubtitleCapabilities(std::vector &subCaps) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) player->GetSubtitleCapabilities(subCaps); } void CApplicationPlayer::GetAudioInfo(std::string& strAudioInfo) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) player->GetAudioInfo(strAudioInfo); } void CApplicationPlayer::GetVideoInfo(std::string& strVideoInfo) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) player->GetVideoInfo(strVideoInfo); } void CApplicationPlayer::GetGeneralInfo(std::string& strVideoInfo) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) player->GetGeneralInfo(strVideoInfo); } int CApplicationPlayer::SeekChapter(int iChapter) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) return player->SeekChapter(iChapter); else @@ -603,35 +603,35 @@ int CApplicationPlayer::SeekChapter(int iChapter) void CApplicationPlayer::GetRenderFeatures(std::vector &renderFeatures) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) player->OMXGetRenderFeatures(renderFeatures); } void CApplicationPlayer::GetDeinterlaceMethods(std::vector &deinterlaceMethods) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) player->OMXGetDeinterlaceMethods(deinterlaceMethods); } void CApplicationPlayer::GetDeinterlaceModes(std::vector &deinterlaceModes) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) player->OMXGetDeinterlaceModes(deinterlaceModes); } void CApplicationPlayer::GetScalingMethods(std::vector &scalingMethods) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (player) player->OMXGetScalingMethods(scalingMethods); } void CApplicationPlayer::SetPlaySpeed(int iSpeed, bool bApplicationMuted) { - boost::shared_ptr player = GetInternal(); + std::shared_ptr player = GetInternal(); if (!player) return; diff --git a/xbmc/ApplicationPlayer.h b/xbmc/ApplicationPlayer.h index 421663627678c..eea702ac21fa4 100644 --- a/xbmc/ApplicationPlayer.h +++ b/xbmc/ApplicationPlayer.h @@ -20,7 +20,7 @@ * */ -#include +#include #include "threads/SingleLock.h" #include "threads/SystemClock.h" #include "cores/playercorefactory/PlayerCoreFactory.h" @@ -48,7 +48,7 @@ struct TextCacheStruct_t; class CApplicationPlayer { - boost::shared_ptr m_pPlayer; + std::shared_ptr m_pPlayer; unsigned int m_iPlayerOPSeq; // used to detect whether an OpenFile request on player is canceled by us. PLAYERCOREID m_eCurrentPlayer; @@ -71,7 +71,7 @@ class CApplicationPlayer void ClosePlayerGapless(PLAYERCOREID newCore); void CreatePlayer(PLAYERCOREID newCore, IPlayerCallback& callback); PLAYERCOREID GetCurrentPlayer() const { return m_eCurrentPlayer; } - boost::shared_ptr GetInternal() const; + std::shared_ptr GetInternal() const; int GetPlaySpeed() const; bool HasPlayer() const; PlayBackRet OpenFile(const CFileItem& item, const CPlayerOptions& options); diff --git a/xbmc/BackgroundInfoLoader.h b/xbmc/BackgroundInfoLoader.h index 5fad3f0605991..6839d9e6f0a4c 100644 --- a/xbmc/BackgroundInfoLoader.h +++ b/xbmc/BackgroundInfoLoader.h @@ -25,9 +25,9 @@ #include "threads/CriticalSection.h" #include -#include "boost/shared_ptr.hpp" +#include -class CFileItem; typedef boost::shared_ptr CFileItemPtr; +class CFileItem; typedef std::shared_ptr CFileItemPtr; class CFileItemList; class IBackgroundLoaderObserver diff --git a/xbmc/CueDocument.cpp b/xbmc/CueDocument.cpp index d22d317a294c5..c7afad718c92f 100644 --- a/xbmc/CueDocument.cpp +++ b/xbmc/CueDocument.cpp @@ -52,6 +52,8 @@ // //////////////////////////////////////////////////////////////////////////////////// +#include + #include "CueDocument.h" #include "utils/log.h" #include "utils/URIUtils.h" diff --git a/xbmc/FileItem.cpp b/xbmc/FileItem.cpp index 32c88249a6fa1..f8607cf145383 100644 --- a/xbmc/FileItem.cpp +++ b/xbmc/FileItem.cpp @@ -18,6 +18,8 @@ * */ +#include + #include "FileItem.h" #include "guilib/LocalizeStrings.h" #include "utils/StringUtils.h" @@ -63,6 +65,7 @@ #endif #include +#include using namespace std; using namespace XFILE; @@ -1888,7 +1891,7 @@ void CFileItemList::Sort(SortDescription sortDescription) SortItems sortItems((size_t)Size()); for (int index = 0; index < Size(); index++) { - sortItems[index] = boost::shared_ptr(new SortItem); + sortItems[index] = std::shared_ptr(new SortItem); m_items[index]->ToSortable(*sortItems[index], fields); (*sortItems[index])[FieldId] = index; } diff --git a/xbmc/FileItem.h b/xbmc/FileItem.h index 4f49b138688e8..e7066652df276 100644 --- a/xbmc/FileItem.h +++ b/xbmc/FileItem.h @@ -34,7 +34,7 @@ #include "threads/CriticalSection.h" #include -#include "boost/shared_ptr.hpp" +#include namespace MUSIC_INFO { @@ -44,14 +44,14 @@ class CVideoInfoTag; namespace EPG { class CEpgInfoTag; - typedef boost::shared_ptr CEpgInfoTagPtr; + typedef std::shared_ptr CEpgInfoTagPtr; } namespace PVR { class CPVRChannel; class CPVRRecording; class CPVRTimerInfoTag; - typedef boost::shared_ptr CPVRRecordingPtr; + typedef std::shared_ptr CPVRRecordingPtr; } class CPictureInfoTag; @@ -495,7 +495,7 @@ class CFileItem : \brief A shared pointer to CFileItem \sa CFileItem */ -typedef boost::shared_ptr CFileItemPtr; +typedef std::shared_ptr CFileItemPtr; /*! \brief A vector of pointer to CFileItem diff --git a/xbmc/GUIInfoManager.cpp b/xbmc/GUIInfoManager.cpp index 18583bf351555..ad0b29d4d65ae 100644 --- a/xbmc/GUIInfoManager.cpp +++ b/xbmc/GUIInfoManager.cpp @@ -59,7 +59,8 @@ #include "utils/SeekHandler.h" #include "URL.h" #include "addons/Skin.h" -#include "boost/make_shared.hpp" +#include +#include #include "cores/DataCacheCore.h" // stuff for current song @@ -140,7 +141,7 @@ bool CGUIInfoManager::OnMessage(CGUIMessage &message) { if (message.GetParam1() == GUI_MSG_UPDATE_ITEM && message.GetItem()) { - CFileItemPtr item = boost::static_pointer_cast(message.GetItem()); + CFileItemPtr item = std::static_pointer_cast(message.GetItem()); if (m_currentFile->IsSamePath(item.get())) { m_currentFile->UpdateInfo(*item); @@ -2197,9 +2198,9 @@ INFO::InfoPtr CGUIInfoManager::Register(const std::string &expression, int conte return *i; if (condition.find_first_of("|+[]!") != condition.npos) - m_bools.push_back(boost::make_shared(condition, context)); + m_bools.push_back(std::make_shared(condition, context)); else - m_bools.push_back(boost::make_shared(condition, context)); + m_bools.push_back(std::make_shared(condition, context)); return m_bools.back(); } @@ -2985,7 +2986,7 @@ bool CGUIInfoManager::GetMultiInfoBool(const GUIInfo &info, int contextWindow, c const CGUIControl *control = window->GetControl(info.GetData1()); if (control && control->IsContainer()) { - CFileItemPtr item = boost::static_pointer_cast(((IGUIContainer *)control)->GetListItem(0)); + CFileItemPtr item = std::static_pointer_cast(((IGUIContainer *)control)->GetListItem(0)); if (item && item->m_iprogramCount == info.GetData2()) // programcount used to store item id bReturn = true; } @@ -3132,7 +3133,7 @@ bool CGUIInfoManager::GetMultiInfoInt(int &value, const GUIInfo &info, int conte { const CGUIControl *control = window->GetControl(data1); if (control && control->IsContainer()) - item = boost::static_pointer_cast(((IGUIContainer *)control)->GetListItem(info.GetData2(), info.GetInfoFlag())); + item = std::static_pointer_cast(((IGUIContainer *)control)->GetListItem(info.GetData2(), info.GetInfoFlag())); } if (item) // If we got a valid item, do the lookup @@ -3175,7 +3176,7 @@ std::string CGUIInfoManager::GetMultiInfoLabel(const GUIInfo &info, int contextW { const CGUIControl *control = window->GetControl(data1); if (control && control->IsContainer()) - item = boost::static_pointer_cast(((IGUIContainer *)control)->GetListItem(info.GetData2(), info.GetInfoFlag())); + item = std::static_pointer_cast(((IGUIContainer *)control)->GetListItem(info.GetData2(), info.GetInfoFlag())); } if (item) // If we got a valid item, do the lookup diff --git a/xbmc/GUIInfoManager.h b/xbmc/GUIInfoManager.h index 0bf5f54db0263..b387cd7be5b3d 100644 --- a/xbmc/GUIInfoManager.h +++ b/xbmc/GUIInfoManager.h @@ -676,7 +676,7 @@ class CGUIWindow; namespace EPG { class CEpgInfoTag; - typedef boost::shared_ptr CEpgInfoTagPtr; + typedef std::shared_ptr CEpgInfoTagPtr; } // Info Flags diff --git a/xbmc/GUILargeTextureManager.cpp b/xbmc/GUILargeTextureManager.cpp index 4c965a5df4f64..d7255a66de813 100644 --- a/xbmc/GUILargeTextureManager.cpp +++ b/xbmc/GUILargeTextureManager.cpp @@ -29,6 +29,8 @@ #include "utils/log.h" #include "TextureCache.h" +#include + using namespace std; diff --git a/xbmc/LangInfo.cpp b/xbmc/LangInfo.cpp index 5831d8d729ff8..208cd2ccd6a77 100644 --- a/xbmc/LangInfo.cpp +++ b/xbmc/LangInfo.cpp @@ -37,6 +37,8 @@ #include "utils/XBMCTinyXML.h" #include "utils/XMLUtils.h" +#include + using namespace std; using namespace PVR; diff --git a/xbmc/NfoFile.cpp b/xbmc/NfoFile.cpp index ead5f7d017db4..930796812e380 100644 --- a/xbmc/NfoFile.cpp +++ b/xbmc/NfoFile.cpp @@ -50,7 +50,7 @@ CNfoFile::NFOResult CNfoFile::Create(const std::string& strPath, const ScraperPt AddonPtr addon; ScraperPtr defaultScraper; if (CAddonMgr::Get().GetDefault(m_type, addon)) - defaultScraper = boost::dynamic_pointer_cast(addon); + defaultScraper = std::dynamic_pointer_cast(addon); if (m_type == ADDON_SCRAPER_ALBUMS) { @@ -102,7 +102,7 @@ CNfoFile::NFOResult CNfoFile::Create(const std::string& strPath, const ScraperPt for (unsigned i = 0; i < addons.size(); ++i) { - ScraperPtr scraper = boost::dynamic_pointer_cast(addons[i]); + ScraperPtr scraper = std::dynamic_pointer_cast(addons[i]); // skip if scraper requires settings and there's nothing set yet if (scraper->RequiresSettings() && !scraper->HasUserSettings()) diff --git a/xbmc/PartyModeManager.h b/xbmc/PartyModeManager.h index b7ac7b9b13b1c..0982679c418ae 100644 --- a/xbmc/PartyModeManager.h +++ b/xbmc/PartyModeManager.h @@ -22,9 +22,9 @@ #include #include -#include +#include -class CFileItem; typedef boost::shared_ptr CFileItemPtr; +class CFileItem; typedef std::shared_ptr CFileItemPtr; class CFileItemList; namespace PLAYLIST { diff --git a/xbmc/PlayListPlayer.cpp b/xbmc/PlayListPlayer.cpp index c6f210e9fb682..9a1ddb9fc4601 100644 --- a/xbmc/PlayListPlayer.cpp +++ b/xbmc/PlayListPlayer.cpp @@ -90,7 +90,7 @@ bool CPlayListPlayer::OnMessage(CGUIMessage &message) for (int i = PLAYLIST_MUSIC; i <= PLAYLIST_VIDEO; i++) { CPlayList &playlist = GetPlaylist(i); - CFileItemPtr item = boost::static_pointer_cast(message.GetItem()); + CFileItemPtr item = std::static_pointer_cast(message.GetItem()); playlist.UpdateItem(item.get()); } } diff --git a/xbmc/PlayListPlayer.h b/xbmc/PlayListPlayer.h index 6903f8242e3cb..2167a7a01b644 100644 --- a/xbmc/PlayListPlayer.h +++ b/xbmc/PlayListPlayer.h @@ -20,7 +20,7 @@ */ #include "guilib/IMsgTargetCallback.h" -#include +#include #define PLAYLIST_NONE -1 #define PLAYLIST_MUSIC 0 @@ -28,7 +28,7 @@ #define PLAYLIST_PICTURE 2 class CAction; -class CFileItem; typedef boost::shared_ptr CFileItemPtr; +class CFileItem; typedef std::shared_ptr CFileItemPtr; class CFileItemList; class CVariant; diff --git a/xbmc/XBDateTime.cpp b/xbmc/XBDateTime.cpp index bc8175058f778..7caf8d15d8e7e 100644 --- a/xbmc/XBDateTime.cpp +++ b/xbmc/XBDateTime.cpp @@ -18,6 +18,8 @@ * */ +#include + #include "XBDateTime.h" #include "LangInfo.h" #include "guilib/LocalizeStrings.h" diff --git a/xbmc/addons/AddonInstaller.cpp b/xbmc/addons/AddonInstaller.cpp index c61da1bf84a89..26a9763b75492 100644 --- a/xbmc/addons/AddonInstaller.cpp +++ b/xbmc/addons/AddonInstaller.cpp @@ -40,6 +40,8 @@ #include "dialogs/GUIDialogProgress.h" #include "URL.h" +#include + using namespace std; using namespace XFILE; using namespace ADDON; @@ -231,7 +233,7 @@ bool CAddonInstaller::Install(const std::string &addonID, bool force, const std: database.GetRepoForAddon(addonID,repo); AddonPtr ptr; CAddonMgr::Get().GetAddon(repo,ptr); - RepositoryPtr therepo = boost::dynamic_pointer_cast(ptr); + RepositoryPtr therepo = std::dynamic_pointer_cast(ptr); std::string hash; if (therepo) hash = therepo->GetAddonHash(addon); @@ -767,7 +769,7 @@ bool CAddonUnInstallJob::DoWork() m_addon->OnPreUnInstall(); AddonPtr repoPtr = CAddonInstallJob::GetRepoForAddon(m_addon); - RepositoryPtr therepo = boost::dynamic_pointer_cast(repoPtr); + RepositoryPtr therepo = std::dynamic_pointer_cast(repoPtr); if (therepo && !therepo->Props().libname.empty()) { CFileItemList dummy; diff --git a/xbmc/addons/AddonManager.cpp b/xbmc/addons/AddonManager.cpp index 9c93c0d2ab2e7..3423b4b5069c9 100644 --- a/xbmc/addons/AddonManager.cpp +++ b/xbmc/addons/AddonManager.cpp @@ -888,7 +888,7 @@ bool CAddonMgr::StartServices(const bool beforelogin) bool ret = true; for (IVECADDONS it = services.begin(); it != services.end(); ++it) { - boost::shared_ptr service = boost::dynamic_pointer_cast(*it); + std::shared_ptr service = std::dynamic_pointer_cast(*it); if (service) { if ( (beforelogin && service->GetStartOption() == CService::STARTUP) @@ -910,7 +910,7 @@ void CAddonMgr::StopServices(const bool onlylogin) for (IVECADDONS it = services.begin(); it != services.end(); ++it) { - boost::shared_ptr service = boost::dynamic_pointer_cast(*it); + std::shared_ptr service = std::dynamic_pointer_cast(*it); if (service) { if ( (onlylogin && service->GetStartOption() == CService::LOGIN) diff --git a/xbmc/addons/GUIWindowAddonBrowser.cpp b/xbmc/addons/GUIWindowAddonBrowser.cpp index 8c62d8496bfdc..b3b73d4c70828 100644 --- a/xbmc/addons/GUIWindowAddonBrowser.cpp +++ b/xbmc/addons/GUIWindowAddonBrowser.cpp @@ -210,7 +210,7 @@ bool CGUIWindowAddonBrowser::OnContextButton(int itemNumber, if (button == CONTEXT_BUTTON_SCAN) { - RepositoryPtr repo = boost::dynamic_pointer_cast(addon); + RepositoryPtr repo = std::dynamic_pointer_cast(addon); CAddonInstaller::Get().UpdateRepos(true); return true; } diff --git a/xbmc/addons/IAddon.h b/xbmc/addons/IAddon.h index ea71126614b28..4da99ebd1c1f0 100644 --- a/xbmc/addons/IAddon.h +++ b/xbmc/addons/IAddon.h @@ -18,9 +18,7 @@ * . * */ -#include "boost/shared_ptr.hpp" - -#include +#include #include #include @@ -64,13 +62,13 @@ namespace ADDON } TYPE; class IAddon; - typedef boost::shared_ptr AddonPtr; + typedef std::shared_ptr AddonPtr; class CVisualisation; - typedef boost::shared_ptr VizPtr; + typedef std::shared_ptr VizPtr; class CSkinInfo; - typedef boost::shared_ptr SkinPtr; + typedef std::shared_ptr SkinPtr; class CPluginSource; - typedef boost::shared_ptr PluginPtr; + typedef std::shared_ptr PluginPtr; class CAddonMgr; class AddonVersion; @@ -78,7 +76,7 @@ namespace ADDON typedef std::map InfoMap; class AddonProps; - class IAddon : public boost::enable_shared_from_this + class IAddon : public std::enable_shared_from_this { public: virtual ~IAddon() {}; diff --git a/xbmc/addons/Repository.cpp b/xbmc/addons/Repository.cpp index 0d0b75a560cf0..c7e8a5bc333d0 100644 --- a/xbmc/addons/Repository.cpp +++ b/xbmc/addons/Repository.cpp @@ -235,7 +235,7 @@ bool CRepositoryUpdateJob::DoWork() { if (ShouldCancel(0, 0)) return false; - const RepositoryPtr repo = boost::dynamic_pointer_cast(*i); + const RepositoryPtr repo = std::dynamic_pointer_cast(*i); VECADDONS newAddons; if (GrabAddons(repo, newAddons)) MergeAddons(addons, newAddons); diff --git a/xbmc/addons/Repository.h b/xbmc/addons/Repository.h index 8ac282c6084bf..339dbf5f114cb 100644 --- a/xbmc/addons/Repository.h +++ b/xbmc/addons/Repository.h @@ -25,7 +25,7 @@ namespace ADDON { class CRepository; - typedef boost::shared_ptr RepositoryPtr; + typedef std::shared_ptr RepositoryPtr; class CRepository : public CAddon { public: diff --git a/xbmc/addons/Scraper.cpp b/xbmc/addons/Scraper.cpp index d6855853e68f5..7d327a0693512 100644 --- a/xbmc/addons/Scraper.cpp +++ b/xbmc/addons/Scraper.cpp @@ -42,6 +42,7 @@ #include "URL.h" #include +#include using namespace std; using namespace XFILE; diff --git a/xbmc/addons/Scraper.h b/xbmc/addons/Scraper.h index c7274f28440d2..730297220292e 100644 --- a/xbmc/addons/Scraper.h +++ b/xbmc/addons/Scraper.h @@ -54,7 +54,7 @@ class CScraperUrl; namespace ADDON { class CScraper; -typedef boost::shared_ptr ScraperPtr; +typedef std::shared_ptr ScraperPtr; std::string TranslateContent(const CONTENT_TYPE &content, bool pretty=false); CONTENT_TYPE TranslateContent(const std::string &string); diff --git a/xbmc/addons/Service.cpp b/xbmc/addons/Service.cpp index c406b11272608..2f5c38c8d31f1 100644 --- a/xbmc/addons/Service.cpp +++ b/xbmc/addons/Service.cpp @@ -129,7 +129,7 @@ bool CService::OnPreInstall() AddonPtr localAddon; // need to grab the local addon so we have the correct library path to stop if (CAddonMgr::Get().GetAddon(ID(), localAddon, ADDON_SERVICE, false)) { - boost::shared_ptr service = boost::dynamic_pointer_cast(localAddon); + std::shared_ptr service = std::dynamic_pointer_cast(localAddon); if (service) service->Stop(); } @@ -143,7 +143,7 @@ void CService::OnPostInstall(bool restart, bool update) AddonPtr localAddon; // need to grab the local addon so we have the correct library path to stop if (CAddonMgr::Get().GetAddon(ID(), localAddon, ADDON_SERVICE, false)) { - boost::shared_ptr service = boost::dynamic_pointer_cast(localAddon); + std::shared_ptr service = std::dynamic_pointer_cast(localAddon); if (service) service->Start(); } diff --git a/xbmc/addons/Skin.cpp b/xbmc/addons/Skin.cpp index 351a821663f91..0b343033bafbd 100644 --- a/xbmc/addons/Skin.cpp +++ b/xbmc/addons/Skin.cpp @@ -41,7 +41,7 @@ using namespace std; using namespace XFILE; -boost::shared_ptr g_SkinInfo; +std::shared_ptr g_SkinInfo; namespace ADDON { diff --git a/xbmc/addons/Skin.h b/xbmc/addons/Skin.h index dd7771a9497cb..c57e9c48124c8 100644 --- a/xbmc/addons/Skin.h +++ b/xbmc/addons/Skin.h @@ -152,4 +152,4 @@ class CSkinInfo : public CAddon } /*namespace ADDON*/ -extern boost::shared_ptr g_SkinInfo; +extern std::shared_ptr g_SkinInfo; diff --git a/xbmc/cdrip/CDDARipJob.cpp b/xbmc/cdrip/CDDARipJob.cpp index 8f404ee92eb41..be8ef3d52d803 100644 --- a/xbmc/cdrip/CDDARipJob.cpp +++ b/xbmc/cdrip/CDDARipJob.cpp @@ -183,7 +183,7 @@ CEncoder* CCDDARipJob::SetupEncoder(CFile& reader) if (CSettings::Get().GetString("audiocds.encoder") == "audioencoder.xbmc.builtin.aac" || CSettings::Get().GetString("audiocds.encoder") == "audioencoder.xbmc.builtin.wma") { - boost::shared_ptr enc(new CEncoderFFmpeg()); + std::shared_ptr enc(new CEncoderFFmpeg()); encoder = new CEncoder(enc); } else @@ -192,9 +192,9 @@ CEncoder* CCDDARipJob::SetupEncoder(CFile& reader) CAddonMgr::Get().GetAddon(CSettings::Get().GetString("audiocds.encoder"), addon); if (addon) { - boost::shared_ptr aud = boost::static_pointer_cast(addon); + std::shared_ptr aud = std::static_pointer_cast(addon); aud->Create(); - boost::shared_ptr enc = boost::static_pointer_cast(aud); + std::shared_ptr enc = std::static_pointer_cast(aud); encoder = new CEncoder(enc); } } diff --git a/xbmc/cdrip/CDDARipper.cpp b/xbmc/cdrip/CDDARipper.cpp index 4486519a8eb47..eb8457e963998 100644 --- a/xbmc/cdrip/CDDARipper.cpp +++ b/xbmc/cdrip/CDDARipper.cpp @@ -297,7 +297,7 @@ std::string CCDDARipper::GetTrackName(CFileItem *item) CAddonMgr::Get().GetAddon(CSettings::Get().GetString("audiocds.encoder"), addon); if (addon) { - boost::shared_ptr enc = boost::static_pointer_cast(addon); + std::shared_ptr enc = std::static_pointer_cast(addon); track += enc->extension; } diff --git a/xbmc/cdrip/Encoder.cpp b/xbmc/cdrip/Encoder.cpp index c8bf472a6a3b7..a83898b0011b9 100644 --- a/xbmc/cdrip/Encoder.cpp +++ b/xbmc/cdrip/Encoder.cpp @@ -22,7 +22,7 @@ #include "filesystem/File.h" #include "utils/log.h" -CEncoder::CEncoder(boost::shared_ptr encoder) +CEncoder::CEncoder(std::shared_ptr encoder) { m_file = NULL; m_dwWriteBufferPointer = 0; diff --git a/xbmc/cdrip/Encoder.h b/xbmc/cdrip/Encoder.h index 744f80785f959..4e5324219b822 100644 --- a/xbmc/cdrip/Encoder.h +++ b/xbmc/cdrip/Encoder.h @@ -21,11 +21,11 @@ * */ -#include #include "IEncoder.h" #include #include #include +#include #define WRITEBUFFER_SIZE 131072 // 128k buffer @@ -34,7 +34,7 @@ namespace XFILE { class CFile; } class CEncoder { public: - CEncoder(boost::shared_ptr encoder); + CEncoder(std::shared_ptr encoder); virtual ~CEncoder(); virtual bool Init(const char* strFile, int iInChannels, int iInRate, int iInBits); virtual int Encode(int nNumBytesRead, uint8_t* pbtStream); @@ -62,7 +62,7 @@ class CEncoder static int WriteCallback(void *opaque, uint8_t *data, int size); static int64_t SeekCallback(void *opaque, int64_t offset, int whence); - boost::shared_ptr m_impl; + std::shared_ptr m_impl; XFILE::CFile *m_file; diff --git a/xbmc/cores/AudioEngine/AESinkFactory.cpp b/xbmc/cores/AudioEngine/AESinkFactory.cpp index 619b417e5fea9..a094c2aaf4df4 100644 --- a/xbmc/cores/AudioEngine/AESinkFactory.cpp +++ b/xbmc/cores/AudioEngine/AESinkFactory.cpp @@ -49,6 +49,8 @@ #include "utils/SystemInfo.h" #include "utils/log.h" +#include + void CAESinkFactory::ParseDevice(std::string &device, std::string &driver) { int pos = device.find_first_of(':'); diff --git a/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp b/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp index fe7bbbb50724d..4bf3d04047c02 100644 --- a/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp +++ b/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp @@ -27,6 +27,7 @@ #include "settings/AdvancedSettings.h" #include "settings/Settings.h" #include +#include CAEEncoderFFmpeg::CAEEncoderFFmpeg(): m_BitRate (0 ), diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResamplePi.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResamplePi.cpp index 96f79b7c8c817..fee46e7528a42 100644 --- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResamplePi.cpp +++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResamplePi.cpp @@ -19,6 +19,7 @@ */ #include "system.h" +#include #if defined(TARGET_RASPBERRY_PI) diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp index b391ff33635ea..dcfca67c3bca4 100644 --- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp +++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp @@ -29,6 +29,7 @@ #include "settings/Settings.h" #include // for std::bad_alloc +#include using namespace ActiveAE; diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp index df50940afc0e7..e52d725348901 100644 --- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp +++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include "AESinkALSA.h" #include "cores/AudioEngine/Utils/AEUtil.h" diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp index 9725d6ee3dbc9..8b24703689140 100644 --- a/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp +++ b/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp @@ -20,6 +20,8 @@ #define INITGUID +#include + #include "AESinkDirectSound.h" #include "utils/log.h" #include diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkPi.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkPi.cpp index 89684e40740db..318df3b9a49b5 100644 --- a/xbmc/cores/AudioEngine/Sinks/AESinkPi.cpp +++ b/xbmc/cores/AudioEngine/Sinks/AESinkPi.cpp @@ -24,6 +24,7 @@ #include #include +#include #include "AESinkPi.h" #include "cores/AudioEngine/Utils/AEUtil.h" diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp index 858b008cc49f8..87f50e84e8d81 100644 --- a/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp +++ b/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include "cores/AudioEngine/Utils/AEUtil.h" #include "settings/AdvancedSettings.h" diff --git a/xbmc/cores/AudioEngine/Utils/AEChannelInfo.cpp b/xbmc/cores/AudioEngine/Utils/AEChannelInfo.cpp index afc085ee50452..f45555695b7be 100644 --- a/xbmc/cores/AudioEngine/Utils/AEChannelInfo.cpp +++ b/xbmc/cores/AudioEngine/Utils/AEChannelInfo.cpp @@ -19,6 +19,7 @@ */ #include "AEChannelInfo.h" +#include #include #include #include diff --git a/xbmc/cores/AudioEngine/Utils/AEStreamInfo.cpp b/xbmc/cores/AudioEngine/Utils/AEStreamInfo.cpp index 73b84f320856b..cc68651f05073 100644 --- a/xbmc/cores/AudioEngine/Utils/AEStreamInfo.cpp +++ b/xbmc/cores/AudioEngine/Utils/AEStreamInfo.cpp @@ -20,6 +20,7 @@ #include "AEStreamInfo.h" #include "utils/log.h" +#include #define IEC61937_PREAMBLE1 0xF872 #define IEC61937_PREAMBLE2 0x4E1F diff --git a/xbmc/cores/AudioEngine/Utils/AEUtil.cpp b/xbmc/cores/AudioEngine/Utils/AEUtil.cpp index f5355124514f2..dd616b9665e3e 100644 --- a/xbmc/cores/AudioEngine/Utils/AEUtil.cpp +++ b/xbmc/cores/AudioEngine/Utils/AEUtil.cpp @@ -25,6 +25,8 @@ #include "utils/log.h" #include "utils/TimeUtils.h" +#include + extern "C" { #include "libavutil/channel_layout.h" } diff --git a/xbmc/cores/DllLoader/DllLoader.cpp b/xbmc/cores/DllLoader/DllLoader.cpp index 1798c2d174eae..01f8e9ad7b442 100644 --- a/xbmc/cores/DllLoader/DllLoader.cpp +++ b/xbmc/cores/DllLoader/DllLoader.cpp @@ -18,6 +18,9 @@ * */ +#include +#include + #include "DllLoader.h" #include "DllLoaderContainer.h" #include "filesystem/SpecialProtocol.h" diff --git a/xbmc/cores/VideoRenderers/DXVA.cpp b/xbmc/cores/VideoRenderers/DXVA.cpp index 2f38ed0471bc6..a5a6d33adaff2 100644 --- a/xbmc/cores/VideoRenderers/DXVA.cpp +++ b/xbmc/cores/VideoRenderers/DXVA.cpp @@ -31,7 +31,6 @@ #include "WinRenderer.h" #include "settings/Settings.h" #include "settings/MediaSettings.h" -#include "boost/shared_ptr.hpp" #include "utils/AutoPtrHandle.h" #include "utils/StringUtils.h" #include "settings/AdvancedSettings.h" @@ -40,6 +39,8 @@ #include "win32/WIN32Util.h" #include "utils/Log.h" +#include + using namespace DXVA; using namespace AUTOPTR; using namespace std; @@ -138,7 +139,7 @@ static const dxva2_deinterlacetech_t *dxva2_find_deinterlacetech(unsigned flags) return NULL; } -#define SCOPE(type, var) boost::shared_ptr var##_holder(var, CoTaskMemFree); +#define SCOPE(type, var) std::shared_ptr var##_holder(var, CoTaskMemFree); CCriticalSection CProcessor::m_dlSection; HMODULE CProcessor::m_dlHandle = NULL; diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthrough.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthrough.cpp index 79b4e6ed73aa5..4ba6ed9894bd4 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthrough.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthrough.cpp @@ -25,6 +25,8 @@ #include "settings/Settings.h" #include "utils/log.h" +#include + #include "cores/AudioEngine/AEFactory.h" CDVDAudioCodecPassthrough::CDVDAudioCodecPassthrough(void) : diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlay.h b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlay.h index 684460d61c7b8..e9be084d97a97 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlay.h +++ b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlay.h @@ -92,7 +92,7 @@ class CDVDOverlay } /** - * static release function for use with boost shared ptr for example + * static release function for use with shared ptr for example */ static void Release(CDVDOverlay* ov) { diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp index 40a36f6bb29ec..015d4bf4b363a 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp @@ -50,6 +50,8 @@ #include #include +#include + static bool CanSurfaceRenderBlackList(const std::string &name) { // All devices 'should' be capiable of surface rendering @@ -123,7 +125,7 @@ class CNULL_Listener : public CJNISurfaceTextureOnFrameAvailableListener class CDVDMediaCodecOnFrameAvailable : public CEvent, CJNISurfaceTextureOnFrameAvailableListener { public: - CDVDMediaCodecOnFrameAvailable(boost::shared_ptr &surfaceTexture) + CDVDMediaCodecOnFrameAvailable(std::shared_ptr &surfaceTexture) : m_surfaceTexture(surfaceTexture) { m_surfaceTexture->setOnFrameAvailableListener(*this); @@ -143,7 +145,7 @@ class CDVDMediaCodecOnFrameAvailable : public CEvent, CJNISurfaceTextureOnFrameA } private: - boost::shared_ptr m_surfaceTexture; + std::shared_ptr m_surfaceTexture; }; @@ -152,9 +154,9 @@ class CDVDMediaCodecOnFrameAvailable : public CEvent, CJNISurfaceTextureOnFrameA CDVDMediaCodecInfo::CDVDMediaCodecInfo( int index , unsigned int texture - , boost::shared_ptr &codec - , boost::shared_ptr &surfacetexture - , boost::shared_ptr &frameready + , std::shared_ptr &codec + , std::shared_ptr &surfacetexture + , std::shared_ptr &frameready ) : m_refs(1) , m_valid(true) @@ -421,7 +423,7 @@ bool CDVDVideoCodecAndroidMediaCodec::Open(CDVDStreamInfo &hints, CDVDCodecOptio { if (types[j] == m_mime) { - m_codec = boost::shared_ptr(new CJNIMediaCodec(CJNIMediaCodec::createByCodecName(m_codecname))); + m_codec = std::shared_ptr(new CJNIMediaCodec(CJNIMediaCodec::createByCodecName(m_codecname))); // clear any jni exceptions, jni gets upset if we do not. if (xbmc_jnienv()->ExceptionCheck()) @@ -1225,9 +1227,9 @@ void CDVDVideoCodecAndroidMediaCodec::InitSurfaceTexture(void) glBindTexture( GL_TEXTURE_EXTERNAL_OES, 0); m_textureId = texture_id; - m_surfaceTexture = boost::shared_ptr(new CJNISurfaceTexture(m_textureId)); + m_surfaceTexture = std::shared_ptr(new CJNISurfaceTexture(m_textureId)); // hook the surfaceTexture OnFrameAvailable callback - m_frameAvailable = boost::shared_ptr(new CDVDMediaCodecOnFrameAvailable(m_surfaceTexture)); + m_frameAvailable = std::shared_ptr(new CDVDMediaCodecOnFrameAvailable(m_surfaceTexture)); m_surface = new CJNISurface(*m_surfaceTexture); } else diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.h index d93dd0a47d1b8..b29471b8e2e96 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.h +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.h @@ -22,7 +22,7 @@ #include #include -#include +#include #include "DVDVideoCodec.h" #include "DVDStreamInfo.h" @@ -49,9 +49,9 @@ class CDVDMediaCodecInfo public: CDVDMediaCodecInfo( int index, unsigned int texture, - boost::shared_ptr &codec, - boost::shared_ptr &surfacetexture, - boost::shared_ptr &frameready); + std::shared_ptr &codec, + std::shared_ptr &surfacetexture, + std::shared_ptr &frameready); // reference counting CDVDMediaCodecInfo* Retain(); @@ -80,9 +80,9 @@ class CDVDMediaCodecInfo CCriticalSection m_section; // shared_ptr bits, shared between // CDVDVideoCodecAndroidMediaCodec and LinuxRenderGLES. - boost::shared_ptr m_codec; - boost::shared_ptr m_surfacetexture; - boost::shared_ptr m_frameready; + std::shared_ptr m_codec; + std::shared_ptr m_surfacetexture; + std::shared_ptr m_frameready; }; class CDVDVideoCodecAndroidMediaCodec : public CDVDVideoCodec @@ -128,9 +128,9 @@ class CDVDVideoCodecAndroidMediaCodec : public CDVDVideoCodec // we need these as shared_ptr because CDVDVideoCodecAndroidMediaCodec // will get deleted before CLinuxRendererGLES is shut down and // CLinuxRendererGLES refs them via CDVDMediaCodecInfo. - boost::shared_ptr m_codec; - boost::shared_ptr m_surfaceTexture; - boost::shared_ptr m_frameAvailable; + std::shared_ptr m_codec; + std::shared_ptr m_surfaceTexture; + std::shared_ptr m_frameAvailable; std::queue m_demux; std::vector m_input; diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp index 5ec0e9ba7679e..9f8e3c9a6892f 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp @@ -36,7 +36,7 @@ #include "settings/Settings.h" #include "settings/VideoSettings.h" #include "utils/log.h" -#include "boost/shared_ptr.hpp" +#include #include "threads/Atomics.h" #ifndef TARGET_POSIX @@ -70,7 +70,7 @@ extern "C" { #include "libavfilter/buffersrc.h" } -using namespace boost; +using namespace std; enum PixelFormat CDVDVideoCodecFFmpeg::GetFormat( struct AVCodecContext * avctx , const PixelFormat * fmt ) diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.cpp index ca0abcc000070..eaab2b8fae0a1 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.cpp @@ -32,6 +32,8 @@ #include "settings/AdvancedSettings.h" #include "threads/Atomics.h" +#include + #define FRAME_ALIGN 16 #define MEDIAINFO 1 #define _4CC(c1,c2,c3,c4) (((uint32_t)(c4)<<24)|((uint32_t)(c3)<<16)|((uint32_t)(c2)<<8)|(uint32_t)(c1)) diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp index e3dc9dcae7631..fc83287af9439 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp @@ -37,7 +37,7 @@ #include "../../../VideoRenderers/WinRenderer.h" #include "settings/Settings.h" #include "settings/MediaSettings.h" -#include "boost/shared_ptr.hpp" +#include #include "utils/AutoPtrHandle.h" #include "utils/StringUtils.h" #include "settings/AdvancedSettings.h" diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/MMALCodec.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/MMALCodec.h index b1b7c90ab402e..4c04427dfde99 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/MMALCodec.h +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/MMALCodec.h @@ -35,14 +35,14 @@ #include #include -#include +#include #include #include "guilib/Geometry.h" #include "rendering/RenderSystem.h" #include "cores/VideoRenderers/BaseRenderer.h" class CMMALVideo; -typedef boost::shared_ptr MMALVideoPtr; +typedef std::shared_ptr MMALVideoPtr; // a mmal video frame class CMMALVideoBuffer diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h index f737edc43e099..b2c12cf6d17ce 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h @@ -35,6 +35,7 @@ #include "utils/ActorProtocol.h" #include #include +#include #include #include "linux/sse4/DllLibSSE4.h" diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/libstagefrightICS/StageFrightVideoPrivate.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/libstagefrightICS/StageFrightVideoPrivate.h index ebd19ce45dc2f..02a6dc42d9ed7 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/libstagefrightICS/StageFrightVideoPrivate.h +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/libstagefrightICS/StageFrightVideoPrivate.h @@ -33,6 +33,10 @@ #include #include +#if __cplusplus >= 201103L +#define char16_t LIBRARY_char16_t +#define char32_t LIBRARY_char32_t +#endif #include #include #include @@ -42,6 +46,10 @@ #include #include #include +#if __cplusplus >= 201103L +#undef char16_t +#undef char32_t +#endif #include "system_gl.h" diff --git a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxCC.cpp b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxCC.cpp index 47dd89e9e8846..24d56da6fd109 100644 --- a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxCC.cpp +++ b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxCC.cpp @@ -24,6 +24,8 @@ #include "cores/dvdplayer/DVDCodecs/Overlay/contrib/cc_decoder708.h" #include "utils/log.h" +#include + class CBitstream { public: diff --git a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.h b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.h index 0dab33dbf1595..2fc3c6309cdac 100644 --- a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.h +++ b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.h @@ -108,7 +108,7 @@ class CDVDDemuxPVRClient : public CDVDDemux #define MAX_STREAMS 100 #endif CDemuxStream* m_streams[MAX_STREAMS]; // maximum number of streams that ffmpeg can handle - boost::shared_ptr m_pvrClient; + std::shared_ptr m_pvrClient; private: void RequestStreams(); diff --git a/xbmc/cores/dvdplayer/DVDDemuxers/DVDFactoryDemuxer.cpp b/xbmc/cores/dvdplayer/DVDDemuxers/DVDFactoryDemuxer.cpp index 343651c6fd51f..e70d1b0de7891 100644 --- a/xbmc/cores/dvdplayer/DVDDemuxers/DVDFactoryDemuxer.cpp +++ b/xbmc/cores/dvdplayer/DVDDemuxers/DVDFactoryDemuxer.cpp @@ -125,7 +125,7 @@ CDVDDemux* CDVDFactoryDemuxer::CreateDemuxer(CDVDInputStream* pInputStream, bool /* Use PVR demuxer only for live streams */ if (URIUtils::IsPVRChannel(pInputStream->GetFileName())) { - boost::shared_ptr client; + std::shared_ptr client; if (g_PVRClients->GetPlayingClient(client) && client->HandlesDemuxing()) { diff --git a/xbmc/cores/dvdplayer/DVDFileInfo.cpp b/xbmc/cores/dvdplayer/DVDFileInfo.cpp index ef297bc2e07fd..74743332199b5 100644 --- a/xbmc/cores/dvdplayer/DVDFileInfo.cpp +++ b/xbmc/cores/dvdplayer/DVDFileInfo.cpp @@ -18,6 +18,8 @@ * */ +#include + #include "threads/SystemClock.h" #include "DVDFileInfo.h" #include "FileItem.h" diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStream.h b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStream.h index 17006b6b7b97d..72af2ddeaf8f5 100644 --- a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStream.h +++ b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStream.h @@ -57,7 +57,7 @@ namespace XFILE namespace PVR { class CPVRChannel; - typedef boost::shared_ptr CPVRChannelPtr; + typedef std::shared_ptr CPVRChannelPtr; } class CDVDInputStream diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp index 6056e51c8be2c..2ef5f95d7fa87 100644 --- a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp +++ b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp @@ -20,6 +20,8 @@ #include "system.h" #ifdef HAVE_LIBBLURAY +#include + #include "DVDInputStreamBluray.h" #include "IDVDPlayer.h" #include "DVDCodecs/Overlay/DVDOverlay.h" diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.h b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.h index 7c75d646cc137..1f5f9266520f2 100644 --- a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.h +++ b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.h @@ -22,7 +22,7 @@ #include "DVDInputStream.h" #include -#include +#include extern "C" { @@ -133,7 +133,7 @@ class CDVDInputStreamBluray bool m_menu; bool m_navmode; - typedef boost::shared_ptr SOverlay; + typedef std::shared_ptr SOverlay; typedef std::list SOverlays; struct SPlane diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamStack.cpp b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamStack.cpp index cfd5339ad5d58..fbe24b8136ab8 100644 --- a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamStack.cpp +++ b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamStack.cpp @@ -27,7 +27,6 @@ #include using namespace XFILE; -using namespace boost; using namespace std; CDVDInputStreamStack::CDVDInputStreamStack() : CDVDInputStream(DVDSTREAM_TYPE_FILE) diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamStack.h b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamStack.h index d837710392764..de35a8260661d 100644 --- a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamStack.h +++ b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamStack.h @@ -21,7 +21,7 @@ */ #include "DVDInputStream.h" -#include "boost/shared_ptr.hpp" +#include class CDVDInputStreamStack : public CDVDInputStream { @@ -39,7 +39,7 @@ class CDVDInputStreamStack : public CDVDInputStream protected: - typedef boost::shared_ptr TFile; + typedef std::shared_ptr TFile; struct TSeg { diff --git a/xbmc/cores/dvdplayer/DVDMessage.cpp b/xbmc/cores/dvdplayer/DVDMessage.cpp index 40411c4609320..1e0867bbccc94 100644 --- a/xbmc/cores/dvdplayer/DVDMessage.cpp +++ b/xbmc/cores/dvdplayer/DVDMessage.cpp @@ -18,6 +18,7 @@ * */ +#include #include "threads/SystemClock.h" #include "DVDMessage.h" #include "DVDDemuxers/DVDDemuxUtils.h" diff --git a/xbmc/cores/dvdplayer/DVDMessageQueue.h b/xbmc/cores/dvdplayer/DVDMessageQueue.h index 325b15f72fbb6..6c6ba5034e3cc 100644 --- a/xbmc/cores/dvdplayer/DVDMessageQueue.h +++ b/xbmc/cores/dvdplayer/DVDMessageQueue.h @@ -23,6 +23,7 @@ #include "DVDMessage.h" #include #include +#include #include "threads/CriticalSection.h" #include "threads/Event.h" diff --git a/xbmc/cores/paplayer/NSFCodec.cpp b/xbmc/cores/paplayer/NSFCodec.cpp index 9ced1f1b88a49..1438368c18b2e 100644 --- a/xbmc/cores/paplayer/NSFCodec.cpp +++ b/xbmc/cores/paplayer/NSFCodec.cpp @@ -17,6 +17,7 @@ * . * */ +#include #include "NSFCodec.h" #include "utils/log.h" diff --git a/xbmc/dbwrappers/DatabaseQuery.cpp b/xbmc/dbwrappers/DatabaseQuery.cpp index 5e6fd443ab0e0..e443d3dad9f99 100644 --- a/xbmc/dbwrappers/DatabaseQuery.cpp +++ b/xbmc/dbwrappers/DatabaseQuery.cpp @@ -483,13 +483,13 @@ bool CDatabaseQueryRuleCombination::Load(const CVariant &obj, const IDatabaseQue if (it->isMember("and") || it->isMember("or")) { - boost::shared_ptr combo(factory->CreateCombination()); + std::shared_ptr combo(factory->CreateCombination()); if (combo && combo->Load(*it, factory)) m_combinations.push_back(combo); } else { - boost::shared_ptr rule(factory->CreateRule()); + std::shared_ptr rule(factory->CreateRule()); if (rule && rule->Load(*it)) m_rules.push_back(rule); } diff --git a/xbmc/dbwrappers/DatabaseQuery.h b/xbmc/dbwrappers/DatabaseQuery.h index d3eec3274ea26..f17c22fea2aa6 100644 --- a/xbmc/dbwrappers/DatabaseQuery.h +++ b/xbmc/dbwrappers/DatabaseQuery.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include #define DATABASEQUERY_RULE_VALUE_SEPARATOR " / " @@ -101,8 +101,8 @@ class CDatabaseQueryRule class CDatabaseQueryRuleCombination; -typedef std::vector< boost::shared_ptr > CDatabaseQueryRules; -typedef std::vector< boost::shared_ptr > CDatabaseQueryRuleCombinations; +typedef std::vector< std::shared_ptr > CDatabaseQueryRules; +typedef std::vector< std::shared_ptr > CDatabaseQueryRuleCombinations; class IDatabaseQueryRuleFactory { diff --git a/xbmc/dbwrappers/mysqldataset.cpp b/xbmc/dbwrappers/mysqldataset.cpp index d8df89fb030fd..4b0a38708371d 100644 --- a/xbmc/dbwrappers/mysqldataset.cpp +++ b/xbmc/dbwrappers/mysqldataset.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include "utils/log.h" #include "system.h" // for GetLastError() diff --git a/xbmc/dialogs/GUIDialogBusy.cpp b/xbmc/dialogs/GUIDialogBusy.cpp index e7cfcddc02e34..a0f6726ab7290 100644 --- a/xbmc/dialogs/GUIDialogBusy.cpp +++ b/xbmc/dialogs/GUIDialogBusy.cpp @@ -27,13 +27,13 @@ class CBusyWaiter : public CThread { - boost::shared_ptr m_done; + std::shared_ptr m_done; public: CBusyWaiter(IRunnable *runnable) : CThread(runnable, "waiting"), m_done(new CEvent()) { } bool Wait() { - boost::shared_ptr e_done(m_done); + std::shared_ptr e_done(m_done); Create(); return CGUIDialogBusy::WaitOnEvent(*e_done); @@ -42,7 +42,7 @@ class CBusyWaiter : public CThread // 'this' is actually deleted from the thread where it's on the stack virtual void Process() { - boost::shared_ptr e_done(m_done); + std::shared_ptr e_done(m_done); CThread::Process(); (*e_done).Set(); diff --git a/xbmc/dialogs/GUIDialogSmartPlaylistEditor.cpp b/xbmc/dialogs/GUIDialogSmartPlaylistEditor.cpp index ada5f6f88bac6..dc5e86c6fbafd 100644 --- a/xbmc/dialogs/GUIDialogSmartPlaylistEditor.cpp +++ b/xbmc/dialogs/GUIDialogSmartPlaylistEditor.cpp @@ -150,7 +150,7 @@ void CGUIDialogSmartPlaylistEditor::OnRuleList(int item) { if (item < 0 || item >= (int)m_playlist.m_ruleCombination.m_rules.size()) return; - CSmartPlaylistRule rule = *boost::static_pointer_cast(m_playlist.m_ruleCombination.m_rules[item]); + CSmartPlaylistRule rule = *std::static_pointer_cast(m_playlist.m_ruleCombination.m_rules[item]); if (CGUIDialogSmartPlaylistRule::EditRule(rule,m_playlist.GetType())) *m_playlist.m_ruleCombination.m_rules[item] = rule; @@ -298,7 +298,7 @@ void CGUIDialogSmartPlaylistEditor::UpdateButtons() if (m_playlist.m_ruleCombination.m_rules[i]->m_field == FieldNone) item->SetLabel(g_localizeStrings.Get(21423)); else - item->SetLabel(boost::static_pointer_cast(m_playlist.m_ruleCombination.m_rules[i])->GetLocalizedRule()); + item->SetLabel(std::static_pointer_cast(m_playlist.m_ruleCombination.m_rules[i])->GetLocalizedRule()); m_ruleLabels->Add(item); } CGUIMessage msg(GUI_MSG_LABEL_BIND, GetID(), CONTROL_RULE_LIST, 0, 0, m_ruleLabels); diff --git a/xbmc/epg/EpgDatabase.cpp b/xbmc/epg/EpgDatabase.cpp index 8e21e5033b32e..3a8a186cd1a77 100644 --- a/xbmc/epg/EpgDatabase.cpp +++ b/xbmc/epg/EpgDatabase.cpp @@ -17,6 +17,7 @@ * . * */ +#include #include "dbwrappers/dataset.h" #include "settings/AdvancedSettings.h" diff --git a/xbmc/epg/EpgInfoTag.h b/xbmc/epg/EpgInfoTag.h index de0162fb05021..2fc6afb171ead 100644 --- a/xbmc/epg/EpgInfoTag.h +++ b/xbmc/epg/EpgInfoTag.h @@ -27,7 +27,7 @@ #include "pvr/timers/PVRTimerInfoTag.h" #include "pvr/recordings/PVRRecording.h" -#include +#include #include #define EPG_DEBUGGING 0 @@ -38,7 +38,7 @@ namespace EPG class CEpg; class CEpgInfoTag; - typedef boost::shared_ptr CEpgInfoTagPtr; + typedef std::shared_ptr CEpgInfoTagPtr; class CEpgInfoTag : public ISerializable { diff --git a/xbmc/epg/GUIEPGGridContainer.cpp b/xbmc/epg/GUIEPGGridContainer.cpp index 2c3d624b20aa7..3cb997512ad7d 100644 --- a/xbmc/epg/GUIEPGGridContainer.cpp +++ b/xbmc/epg/GUIEPGGridContainer.cpp @@ -1282,7 +1282,7 @@ CPVRChannel* CGUIEPGGridContainer::GetChannel(int iIndex) { if (iIndex >= 0 && (size_t) iIndex < m_channelItems.size()) { - CFileItemPtr fileItem = boost::static_pointer_cast(m_channelItems[iIndex]); + CFileItemPtr fileItem = std::static_pointer_cast(m_channelItems[iIndex]); if (fileItem->HasPVRChannelInfoTag()) return fileItem->GetPVRChannelInfoTag(); } diff --git a/xbmc/filesystem/AddonsDirectory.cpp b/xbmc/filesystem/AddonsDirectory.cpp index b9d4846280ae1..1f044d300c51a 100644 --- a/xbmc/filesystem/AddonsDirectory.cpp +++ b/xbmc/filesystem/AddonsDirectory.cpp @@ -287,7 +287,7 @@ bool CAddonsDirectory::GetScriptsAndPlugins(const std::string &content, VECADDON CAddonMgr::Get().GetAddons(ADDON_PLUGIN, tempAddons); for (unsigned i=0; i(tempAddons[i]); + PluginPtr plugin = std::dynamic_pointer_cast(tempAddons[i]); if (plugin && plugin->Provides(type)) addons.push_back(tempAddons[i]); } @@ -295,7 +295,7 @@ bool CAddonsDirectory::GetScriptsAndPlugins(const std::string &content, VECADDON CAddonMgr::Get().GetAddons(ADDON_SCRIPT, tempAddons); for (unsigned i=0; i(tempAddons[i]); + PluginPtr plugin = std::dynamic_pointer_cast(tempAddons[i]); if (plugin && plugin->Provides(type)) addons.push_back(tempAddons[i]); } @@ -315,7 +315,7 @@ bool CAddonsDirectory::GetScriptsAndPlugins(const std::string &content, CFileIte CFileItemPtr item(FileItemFromAddon(addons[i], addons[i]->Type()==ADDON_PLUGIN?"plugin://":"script://", addons[i]->Type() == ADDON_PLUGIN)); - PluginPtr plugin = boost::dynamic_pointer_cast(addons[i]); + PluginPtr plugin = std::dynamic_pointer_cast(addons[i]); if (plugin->ProvidesSeveral()) { CURL url = item->GetURL(); diff --git a/xbmc/filesystem/AddonsDirectory.h b/xbmc/filesystem/AddonsDirectory.h index d4a23e8b84a99..5021aeca15886 100644 --- a/xbmc/filesystem/AddonsDirectory.h +++ b/xbmc/filesystem/AddonsDirectory.h @@ -23,7 +23,7 @@ #include "addons/AddonManager.h" class CURL; -typedef boost::shared_ptr CFileItemPtr; +typedef std::shared_ptr CFileItemPtr; namespace XFILE { diff --git a/xbmc/filesystem/BlurayDirectory.cpp b/xbmc/filesystem/BlurayDirectory.cpp index 349469dbad05e..619ab4c3390a5 100644 --- a/xbmc/filesystem/BlurayDirectory.cpp +++ b/xbmc/filesystem/BlurayDirectory.cpp @@ -29,6 +29,8 @@ #include "video/VideoInfoTag.h" #include "guilib/LocalizeStrings.h" +#include + namespace XFILE { diff --git a/xbmc/filesystem/CDDAFile.cpp b/xbmc/filesystem/CDDAFile.cpp index b3405c49eb9b7..16796f555c9c3 100644 --- a/xbmc/filesystem/CDDAFile.cpp +++ b/xbmc/filesystem/CDDAFile.cpp @@ -30,6 +30,8 @@ #include "utils/log.h" #include "utils/URIUtils.h" +#include + using namespace MEDIA_DETECT; using namespace XFILE; diff --git a/xbmc/filesystem/CDDAFile.h b/xbmc/filesystem/CDDAFile.h index 801b02618cee1..0427af4534bfe 100644 --- a/xbmc/filesystem/CDDAFile.h +++ b/xbmc/filesystem/CDDAFile.h @@ -54,7 +54,7 @@ class CFileCDDA : public IFile lsn_t m_lsnCurrent; // Position inside the track in logical sector number lsn_t m_lsnEnd; // End of m_iTrack in logical sector number int m_iSectorCount; // max number of sectors to read at once - boost::shared_ptr m_cdio; + std::shared_ptr m_cdio; }; } diff --git a/xbmc/filesystem/CacheStrategy.cpp b/xbmc/filesystem/CacheStrategy.cpp index f7b4f0a0e5d55..d9c8d53219050 100644 --- a/xbmc/filesystem/CacheStrategy.cpp +++ b/xbmc/filesystem/CacheStrategy.cpp @@ -36,6 +36,9 @@ #define CacheLocalFile CWin32File #endif // TARGET_WINDOWS +#include +#include + using namespace XFILE; CCacheStrategy::CCacheStrategy() : m_bEndOfInput(false) diff --git a/xbmc/filesystem/CircularCache.cpp b/xbmc/filesystem/CircularCache.cpp index eb8c044959db5..fc4e99a211867 100644 --- a/xbmc/filesystem/CircularCache.cpp +++ b/xbmc/filesystem/CircularCache.cpp @@ -18,6 +18,7 @@ * */ +#include #include "threads/SystemClock.h" #include "system.h" #include "utils/log.h" diff --git a/xbmc/filesystem/CurlFile.cpp b/xbmc/filesystem/CurlFile.cpp index 7d68daba125c8..25aceea6f4abe 100644 --- a/xbmc/filesystem/CurlFile.cpp +++ b/xbmc/filesystem/CurlFile.cpp @@ -29,6 +29,7 @@ #include #include +#include #ifdef TARGET_POSIX #include diff --git a/xbmc/filesystem/Directory.cpp b/xbmc/filesystem/Directory.cpp index d1413d43e320e..bb61e4dfd9b38 100644 --- a/xbmc/filesystem/Directory.cpp +++ b/xbmc/filesystem/Directory.cpp @@ -57,8 +57,8 @@ class CGetDirectory struct CGetJob : CJob { - CGetJob(boost::shared_ptr& imp - , boost::shared_ptr& result) + CGetJob(std::shared_ptr& imp + , std::shared_ptr& result) : m_result(result) , m_imp(imp) {} @@ -71,13 +71,13 @@ class CGetDirectory return m_result->m_result; } - boost::shared_ptr m_result; - boost::shared_ptr m_imp; + std::shared_ptr m_result; + std::shared_ptr m_imp; }; public: - CGetDirectory(boost::shared_ptr& imp, const CURL& dir, const CURL& listDir) + CGetDirectory(std::shared_ptr& imp, const CURL& dir, const CURL& listDir) : m_result(new CResult(dir, listDir)) { m_id = CJobManager::GetInstance().AddJob(new CGetJob(imp, m_result) @@ -106,7 +106,7 @@ class CGetDirectory list.Copy(m_result->m_list); return true; } - boost::shared_ptr m_result; + std::shared_ptr m_result; unsigned int m_id; }; @@ -144,7 +144,7 @@ bool CDirectory::GetDirectory(const CURL& url, CFileItemList &items, const CHint try { CURL realURL = URIUtils::SubstitutePath(url); - boost::shared_ptr pDirectory(CDirectoryFactory::Create(realURL)); + std::shared_ptr pDirectory(CDirectoryFactory::Create(realURL)); if (!pDirectory.get()) return false; diff --git a/xbmc/filesystem/DirectoryCache.cpp b/xbmc/filesystem/DirectoryCache.cpp index 76ea5540fd557..987760a5f46eb 100644 --- a/xbmc/filesystem/DirectoryCache.cpp +++ b/xbmc/filesystem/DirectoryCache.cpp @@ -26,6 +26,8 @@ #include "utils/StringUtils.h" #include "climits" +#include + using namespace std; using namespace XFILE; diff --git a/xbmc/filesystem/DirectoryHistory.cpp b/xbmc/filesystem/DirectoryHistory.cpp index 319e20bc094d4..fb04148de3fbe 100644 --- a/xbmc/filesystem/DirectoryHistory.cpp +++ b/xbmc/filesystem/DirectoryHistory.cpp @@ -23,6 +23,8 @@ #include "utils/StringUtils.h" #include "utils/URIUtils.h" +#include + using namespace std; const std::string& CDirectoryHistory::CPathHistoryItem::GetPath(bool filter /* = false */) const diff --git a/xbmc/filesystem/FileCache.cpp b/xbmc/filesystem/FileCache.cpp index 3880c58d99cc3..2152fefcedeb9 100644 --- a/xbmc/filesystem/FileCache.cpp +++ b/xbmc/filesystem/FileCache.cpp @@ -31,6 +31,9 @@ #include "utils/TimeUtils.h" #include "settings/AdvancedSettings.h" +#include +#include + using namespace AUTOPTR; using namespace XFILE; diff --git a/xbmc/filesystem/HTSPDirectory.cpp b/xbmc/filesystem/HTSPDirectory.cpp index 95b58aec5610e..e15abd5f160a3 100644 --- a/xbmc/filesystem/HTSPDirectory.cpp +++ b/xbmc/filesystem/HTSPDirectory.cpp @@ -30,6 +30,8 @@ #include "utils/TimeUtils.h" #include "utils/StringUtils.h" +#include + extern "C" { #include "libhts/htsmsg.h" #include "libhts/htsmsg_binary.h" diff --git a/xbmc/filesystem/HTSPDirectory.h b/xbmc/filesystem/HTSPDirectory.h index daf15a3b0929f..953883a9e2887 100644 --- a/xbmc/filesystem/HTSPDirectory.h +++ b/xbmc/filesystem/HTSPDirectory.h @@ -24,10 +24,10 @@ #include "threads/CriticalSection.h" #include "threads/Event.h" #include "HTSPSession.h" -#include "boost/shared_ptr.hpp" +#include class CURL; -class CFileItem; typedef boost::shared_ptr CFileItemPtr; +class CFileItem; typedef std::shared_ptr CFileItemPtr; namespace HTSP { diff --git a/xbmc/filesystem/SFTPFile.h b/xbmc/filesystem/SFTPFile.h index 4a057d173edba..973b2df226bf8 100644 --- a/xbmc/filesystem/SFTPFile.h +++ b/xbmc/filesystem/SFTPFile.h @@ -35,7 +35,7 @@ #endif // !TARGET_WINDOWS #include #include -#include +#include class CURL; @@ -83,7 +83,7 @@ class CSFTPSession int m_LastActive; }; -typedef boost::shared_ptr CSFTPSessionPtr; +typedef std::shared_ptr CSFTPSessionPtr; class CSFTPSessionManager { diff --git a/xbmc/filesystem/SMBFile.cpp b/xbmc/filesystem/SMBFile.cpp index 603f99d2a5c3a..1c18a8140c5cb 100644 --- a/xbmc/filesystem/SMBFile.cpp +++ b/xbmc/filesystem/SMBFile.cpp @@ -489,12 +489,12 @@ ssize_t CSMBFile::Read(void *lpBuf, size_t uiBufSize) if ( bytesRead < 0 && errno == EINVAL ) { - CLog::Log(LOGERROR, "%s - Error( %"PRIdS", %d, %s ) - Retrying", __FUNCTION__, bytesRead, errno, strerror(errno)); + CLog::Log(LOGERROR, "%s - Error( %" PRIdS ", %d, %s ) - Retrying", __FUNCTION__, bytesRead, errno, strerror(errno)); bytesRead = smbc_read(m_fd, lpBuf, (int)uiBufSize); } if ( bytesRead < 0 ) - CLog::Log(LOGERROR, "%s - Error( %"PRIdS", %d, %s )", __FUNCTION__, bytesRead, errno, strerror(errno)); + CLog::Log(LOGERROR, "%s - Error( %" PRIdS ", %d, %s )", __FUNCTION__, bytesRead, errno, strerror(errno)); return bytesRead; } diff --git a/xbmc/filesystem/SpecialProtocol.cpp b/xbmc/filesystem/SpecialProtocol.cpp index 6ce42a0ba93e2..3e1ba022e9549 100644 --- a/xbmc/filesystem/SpecialProtocol.cpp +++ b/xbmc/filesystem/SpecialProtocol.cpp @@ -29,6 +29,7 @@ #include "utils/URIUtils.h" #include "utils/StringUtils.h" +#include #ifdef TARGET_POSIX #include #endif diff --git a/xbmc/filesystem/ZeroconfDirectory.cpp b/xbmc/filesystem/ZeroconfDirectory.cpp index c4789219d78db..20f15de5c3c52 100644 --- a/xbmc/filesystem/ZeroconfDirectory.cpp +++ b/xbmc/filesystem/ZeroconfDirectory.cpp @@ -20,6 +20,7 @@ #include "ZeroconfDirectory.h" #include +#include #include "URL.h" #include "utils/URIUtils.h" diff --git a/xbmc/filesystem/iso9660.cpp b/xbmc/filesystem/iso9660.cpp index e3c9521f18cca..d2e960b6f754f 100644 --- a/xbmc/filesystem/iso9660.cpp +++ b/xbmc/filesystem/iso9660.cpp @@ -19,6 +19,7 @@ * */ +#include #include "system.h" #include "utils/log.h" diff --git a/xbmc/filesystem/win32/Win32Directory.cpp b/xbmc/filesystem/win32/Win32Directory.cpp index eb4c5aa395159..377c5081cda22 100644 --- a/xbmc/filesystem/win32/Win32Directory.cpp +++ b/xbmc/filesystem/win32/Win32Directory.cpp @@ -32,6 +32,8 @@ #endif // WIN32_LEAN_AND_MEAN #include +#include + using namespace XFILE; // check for empty string, remove trailing slash if any, convert to win32 form diff --git a/xbmc/filesystem/win32/Win32File.cpp b/xbmc/filesystem/win32/Win32File.cpp index 0c8b661bc8a5b..11be7cdb6bb13 100644 --- a/xbmc/filesystem/win32/Win32File.cpp +++ b/xbmc/filesystem/win32/Win32File.cpp @@ -37,6 +37,7 @@ #include #include #include +#include using namespace XFILE; diff --git a/xbmc/filesystem/win32/Win32SMBDirectory.cpp b/xbmc/filesystem/win32/Win32SMBDirectory.cpp index e2000ef181e56..ed8cecdc1fa9a 100644 --- a/xbmc/filesystem/win32/Win32SMBDirectory.cpp +++ b/xbmc/filesystem/win32/Win32SMBDirectory.cpp @@ -41,6 +41,8 @@ #include #pragma comment(lib, "Netapi32.lib") +#include + using namespace XFILE; // local helper diff --git a/xbmc/filesystem/win32/Win32SMBFile.cpp b/xbmc/filesystem/win32/Win32SMBFile.cpp index b8f95d1b43a39..2282ce18e3414 100644 --- a/xbmc/filesystem/win32/Win32SMBFile.cpp +++ b/xbmc/filesystem/win32/Win32SMBFile.cpp @@ -29,6 +29,7 @@ #endif // WIN32_LEAN_AND_MEAN #include +#include using namespace XFILE; diff --git a/xbmc/guilib/DDSImage.cpp b/xbmc/guilib/DDSImage.cpp index e9800a0e47c10..c5c3106eef0f6 100644 --- a/xbmc/guilib/DDSImage.cpp +++ b/xbmc/guilib/DDSImage.cpp @@ -18,6 +18,7 @@ * */ +#include #include "DDSImage.h" #include "XBTF.h" #include diff --git a/xbmc/guilib/GUIBaseContainer.cpp b/xbmc/guilib/GUIBaseContainer.cpp index 8413d5c03e60a..651be06097f5a 100644 --- a/xbmc/guilib/GUIBaseContainer.cpp +++ b/xbmc/guilib/GUIBaseContainer.cpp @@ -1227,7 +1227,7 @@ std::string CGUIBaseContainer::GetLabel(int info) const break; case CONTAINER_CURRENT_ITEM: { - if (m_items.size() && m_items[0]->IsFileItem() && (boost::static_pointer_cast(m_items[0]))->IsParentFolder()) + if (m_items.size() && m_items[0]->IsFileItem() && (std::static_pointer_cast(m_items[0]))->IsParentFolder()) label = StringUtils::Format("%i", GetSelectedItem()); else label = StringUtils::Format("%i", GetSelectedItem() + 1); @@ -1236,7 +1236,7 @@ std::string CGUIBaseContainer::GetLabel(int info) const case CONTAINER_NUM_ITEMS: { unsigned int numItems = GetNumItems(); - if (numItems && m_items[0]->IsFileItem() && (boost::static_pointer_cast(m_items[0]))->IsParentFolder()) + if (numItems && m_items[0]->IsFileItem() && (std::static_pointer_cast(m_items[0]))->IsParentFolder()) label = StringUtils::Format("%u", numItems-1); else label = StringUtils::Format("%u", numItems); diff --git a/xbmc/guilib/GUIControlGroup.cpp b/xbmc/guilib/GUIControlGroup.cpp index 5c8dd9fda857d..69e9552df051e 100644 --- a/xbmc/guilib/GUIControlGroup.cpp +++ b/xbmc/guilib/GUIControlGroup.cpp @@ -21,6 +21,8 @@ #include "GUIControlGroup.h" #include "GUIControlProfiler.h" +#include + using namespace std; CGUIControlGroup::CGUIControlGroup() diff --git a/xbmc/guilib/GUIFontCache.h b/xbmc/guilib/GUIFontCache.h index 575ee7d272a81..c3952cf10330a 100644 --- a/xbmc/guilib/GUIFontCache.h +++ b/xbmc/guilib/GUIFontCache.h @@ -33,12 +33,12 @@ #include #include +#include #include "boost/multi_index_container.hpp" #include "boost/multi_index/sequenced_index.hpp" #include "boost/multi_index/hashed_index.hpp" #include "boost/multi_index/member.hpp" -#include "boost/shared_ptr.hpp" #include "TransformMatrix.h" @@ -202,7 +202,7 @@ struct CGUIFontCacheStaticPosition void UpdateWithOffsets(const CGUIFontCacheStaticPosition &cached, bool scrolling) {} }; -struct CGUIFontCacheStaticValue : public boost::shared_ptr > +struct CGUIFontCacheStaticValue : public std::shared_ptr > { void clear() { diff --git a/xbmc/guilib/GUIFontTTF.cpp b/xbmc/guilib/GUIFontTTF.cpp index a16d3db162d8f..e30367de6dddb 100644 --- a/xbmc/guilib/GUIFontTTF.cpp +++ b/xbmc/guilib/GUIFontTTF.cpp @@ -30,9 +30,9 @@ #include "URL.h" #include "filesystem/File.h" #include "threads/SystemClock.h" -#include "boost/make_shared.hpp" #include +#include // stuff for freetype #include @@ -375,10 +375,10 @@ void CGUIFontTTFBase::DrawTextInternal(float x, float y, const vecColors &colors XbmcThreads::SystemClockMillis(), dirtyCache) : unusedVertexBuffer; - boost::shared_ptr > tempVertices = boost::make_shared >(); - boost::shared_ptr > &vertices = hardwareClipping ? + std::shared_ptr > tempVertices = std::make_shared >(); + std::shared_ptr > &vertices = hardwareClipping ? tempVertices : - static_cast >&>(m_staticCache.Lookup(staticPos, + static_cast >&>(m_staticCache.Lookup(staticPos, colors, text, alignment, maxPixelWidth, scrolling, diff --git a/xbmc/guilib/GUIImage.cpp b/xbmc/guilib/GUIImage.cpp index 8438135f7f3bb..f57a86337d4cf 100644 --- a/xbmc/guilib/GUIImage.cpp +++ b/xbmc/guilib/GUIImage.cpp @@ -23,6 +23,8 @@ #include "utils/log.h" #include "utils/TimeUtils.h" +#include + using namespace std; CGUIImage::CGUIImage(int parentID, int controlID, float posX, float posY, float width, float height, const CTextureInfo& texture) diff --git a/xbmc/guilib/GUIMessage.h b/xbmc/guilib/GUIMessage.h index 2198da6f5cf99..6dbbb02e88d49 100644 --- a/xbmc/guilib/GUIMessage.h +++ b/xbmc/guilib/GUIMessage.h @@ -327,10 +327,10 @@ do { \ #include #include -#include +#include // forwards -class CGUIListItem; typedef boost::shared_ptr CGUIListItemPtr; +class CGUIListItem; typedef std::shared_ptr CGUIListItemPtr; class CFileItemList; /*! diff --git a/xbmc/guilib/GUIPanelContainer.cpp b/xbmc/guilib/GUIPanelContainer.cpp index 3de3997b23031..042c8d492b7f1 100644 --- a/xbmc/guilib/GUIPanelContainer.cpp +++ b/xbmc/guilib/GUIPanelContainer.cpp @@ -23,6 +23,8 @@ #include "GUIInfoManager.h" #include "Key.h" +#include + using namespace std; CGUIPanelContainer::CGUIPanelContainer(int parentID, int controlID, float posX, float posY, float width, float height, ORIENTATION orientation, const CScroller& scroller, int preloadItems) diff --git a/xbmc/guilib/GUIStaticItem.h b/xbmc/guilib/GUIStaticItem.h index 207bdb714473b..57cf5f9194bf7 100644 --- a/xbmc/guilib/GUIStaticItem.h +++ b/xbmc/guilib/GUIStaticItem.h @@ -94,4 +94,4 @@ class CGUIStaticItem : public CFileItem CGUIAction m_clickActions; }; -typedef boost::shared_ptr CGUIStaticItemPtr; +typedef std::shared_ptr CGUIStaticItemPtr; diff --git a/xbmc/guilib/GUITextureGLES.cpp b/xbmc/guilib/GUITextureGLES.cpp index 7bc8a1d17563d..03ac9dc004f32 100644 --- a/xbmc/guilib/GUITextureGLES.cpp +++ b/xbmc/guilib/GUITextureGLES.cpp @@ -29,6 +29,8 @@ #include "windowing/WindowingFactory.h" #include "guilib/GraphicContext.h" +#include + #if defined(HAS_GLES) diff --git a/xbmc/guilib/GUIVisualisationControl.cpp b/xbmc/guilib/GUIVisualisationControl.cpp index c09284d96e0e8..bcac34456affc 100644 --- a/xbmc/guilib/GUIVisualisationControl.cpp +++ b/xbmc/guilib/GUIVisualisationControl.cpp @@ -104,7 +104,7 @@ void CGUIVisualisationControl::Process(unsigned int currentTime, CDirtyRegionLis AddonPtr addon; if (ADDON::CAddonMgr::Get().GetDefault(ADDON_VIZ, addon)) { - m_addon = boost::dynamic_pointer_cast(addon); + m_addon = std::dynamic_pointer_cast(addon); if (m_addon) if (!InitCallback(m_addon.get())) m_addon.reset(); diff --git a/xbmc/guilib/GUIWindow.h b/xbmc/guilib/GUIWindow.h index 2f4137e747e0d..f3b96b3a2e2d4 100644 --- a/xbmc/guilib/GUIWindow.h +++ b/xbmc/guilib/GUIWindow.h @@ -29,10 +29,10 @@ */ #include "GUIControlGroup.h" -#include "boost/shared_ptr.hpp" +#include #include "threads/CriticalSection.h" -class CFileItem; typedef boost::shared_ptr CFileItemPtr; +class CFileItem; typedef std::shared_ptr CFileItemPtr; #include "GUICallback.h" // for GUIEvent diff --git a/xbmc/guilib/IGUIContainer.h b/xbmc/guilib/IGUIContainer.h index 9e36ffa9bf276..61a0bd60990d5 100644 --- a/xbmc/guilib/IGUIContainer.h +++ b/xbmc/guilib/IGUIContainer.h @@ -21,9 +21,9 @@ #pragma once #include "GUIControl.h" -#include "boost/shared_ptr.hpp" +#include -typedef boost::shared_ptr CGUIListItemPtr; +typedef std::shared_ptr CGUIListItemPtr; /*! \ingroup controls diff --git a/xbmc/guilib/VisibleEffect.cpp b/xbmc/guilib/VisibleEffect.cpp index a8fb55773a6be..89b98387a8836 100644 --- a/xbmc/guilib/VisibleEffect.cpp +++ b/xbmc/guilib/VisibleEffect.cpp @@ -49,7 +49,7 @@ CAnimEffect::CAnimEffect(unsigned int delay, unsigned int length, EFFECT_TYPE ef m_delay = delay; m_length = length; m_effect = effect; - m_pTweener = boost::shared_ptr(new LinearTweener()); + m_pTweener = std::shared_ptr(new LinearTweener()); } CAnimEffect::~CAnimEffect() @@ -96,28 +96,28 @@ void CAnimEffect::ApplyState(ANIMATION_STATE state, const CPoint ¢er) ApplyEffect(offset, center); } -boost::shared_ptr CAnimEffect::GetTweener(const TiXmlElement *pAnimationNode) +std::shared_ptr CAnimEffect::GetTweener(const TiXmlElement *pAnimationNode) { - boost::shared_ptr m_pTweener; + std::shared_ptr m_pTweener; const char *tween = pAnimationNode->Attribute("tween"); if (tween) { if (strcmpi(tween, "linear")==0) - m_pTweener = boost::shared_ptr(new LinearTweener()); + m_pTweener = std::shared_ptr(new LinearTweener()); else if (strcmpi(tween, "quadratic")==0) - m_pTweener = boost::shared_ptr(new QuadTweener()); + m_pTweener = std::shared_ptr(new QuadTweener()); else if (strcmpi(tween, "cubic")==0) - m_pTweener = boost::shared_ptr(new CubicTweener()); + m_pTweener = std::shared_ptr(new CubicTweener()); else if (strcmpi(tween, "sine")==0) - m_pTweener = boost::shared_ptr(new SineTweener()); + m_pTweener = std::shared_ptr(new SineTweener()); else if (strcmpi(tween, "back")==0) - m_pTweener = boost::shared_ptr(new BackTweener()); + m_pTweener = std::shared_ptr(new BackTweener()); else if (strcmpi(tween, "circle")==0) - m_pTweener = boost::shared_ptr(new CircleTweener()); + m_pTweener = std::shared_ptr(new CircleTweener()); else if (strcmpi(tween, "bounce")==0) - m_pTweener = boost::shared_ptr(new BounceTweener()); + m_pTweener = std::shared_ptr(new BounceTweener()); else if (strcmpi(tween, "elastic")==0) - m_pTweener = boost::shared_ptr(new ElasticTweener()); + m_pTweener = std::shared_ptr(new ElasticTweener()); const char *easing = pAnimationNode->Attribute("easing"); if (m_pTweener && easing) @@ -139,11 +139,11 @@ boost::shared_ptr CAnimEffect::GetTweener(const TiXmlElement *pAnimatio // or quadratic if we have acceleration if (accel) { - m_pTweener = boost::shared_ptr(new QuadTweener(accel)); + m_pTweener = std::shared_ptr(new QuadTweener(accel)); m_pTweener->SetEasing(EASE_IN); } else - m_pTweener = boost::shared_ptr(new LinearTweener()); + m_pTweener = std::shared_ptr(new LinearTweener()); } return m_pTweener; @@ -701,7 +701,7 @@ void CAnimation::AddEffect(const std::string &type, const TiXmlElement *node, co m_effects.push_back(effect); } -CScroller::CScroller(unsigned int duration /* = 200 */, boost::shared_ptr tweener /* = NULL */) +CScroller::CScroller(unsigned int duration /* = 200 */, std::shared_ptr tweener /* = NULL */) { m_scrollValue = 0; m_delta = 0; diff --git a/xbmc/guilib/VisibleEffect.h b/xbmc/guilib/VisibleEffect.h index 22e781228ddb3..0041160cfd1d3 100644 --- a/xbmc/guilib/VisibleEffect.h +++ b/xbmc/guilib/VisibleEffect.h @@ -31,7 +31,7 @@ class CGUIListItem; #include "TransformMatrix.h" // needed for the TransformMatrix member #include "Geometry.h" // for CPoint, CRect -#include "boost/shared_ptr.hpp" +#include #include "interfaces/info/InfoBool.h" #include @@ -69,7 +69,7 @@ class CAnimEffect const TransformMatrix &GetTransform() const { return m_matrix; }; EFFECT_TYPE GetType() const { return m_effect; }; - static boost::shared_ptr GetTweener(const TiXmlElement *pAnimationNode); + static std::shared_ptr GetTweener(const TiXmlElement *pAnimationNode); protected: TransformMatrix m_matrix; EFFECT_TYPE m_effect; @@ -81,7 +81,7 @@ class CAnimEffect unsigned int m_length; unsigned int m_delay; - boost::shared_ptr m_pTweener; + std::shared_ptr m_pTweener; }; class CFadeEffect : public CAnimEffect @@ -216,7 +216,7 @@ class CAnimation class CScroller { public: - CScroller(unsigned int duration = 200, boost::shared_ptr tweener = boost::shared_ptr()); + CScroller(unsigned int duration = 200, std::shared_ptr tweener = std::shared_ptr()); CScroller(const CScroller& right); CScroller& operator=(const CScroller &src); ~CScroller(); @@ -260,5 +260,5 @@ class CScroller unsigned int m_lastTime; //!< Brief last remember time (updated each time Scroll() method is called) unsigned int m_duration; //!< Brief duration of scroll - boost::shared_ptr m_pTweener; + std::shared_ptr m_pTweener; }; diff --git a/xbmc/input/ButtonTranslator.cpp b/xbmc/input/ButtonTranslator.cpp index cbaee9f541a4a..f3e2ad210389c 100644 --- a/xbmc/input/ButtonTranslator.cpp +++ b/xbmc/input/ButtonTranslator.cpp @@ -36,7 +36,8 @@ #include "utils/RegExp.h" #include "XBIRRemote.h" #include "Util.h" -#include + +#include #if defined(TARGET_WINDOWS) #include "input/windows/WINJoystick.h" @@ -775,7 +776,7 @@ void CButtonTranslator::MapJoystickFamily(TiXmlNode *pNode) { TiXmlNode* pName = pMember->FirstChild(); if (pName && pName->ValueStr() != "") { - boost::shared_ptr re(new CRegExp(true, CRegExp::asciiOnly)); + std::shared_ptr re(new CRegExp(true, CRegExp::asciiOnly)); std::string joyRe = JoynameToRegex(pName->ValueStr()); if (!re->RegComp(joyRe, CRegExp::StudyRegExp)) { @@ -809,7 +810,7 @@ void CButtonTranslator::MapJoystickActions(int windowID, TiXmlNode *pJoystick) joyFamilyName = joyName; JoystickFamily* joyFamily = &m_joystickFamilies[joyFamilyName]; - boost::shared_ptr re(new CRegExp(true, CRegExp::asciiOnly)); + std::shared_ptr re(new CRegExp(true, CRegExp::asciiOnly)); std::string joyRe = JoynameToRegex(joyname); if (!re->RegComp(joyRe, CRegExp::StudyRegExp)) { @@ -824,7 +825,7 @@ void CButtonTranslator::MapJoystickActions(int windowID, TiXmlNode *pJoystick) const std::string &type = pNode->ValueStr(); if (type == "altname") { std::string altName = pNode->FirstChild()->ValueStr(); - boost::shared_ptr altRe(new CRegExp(true, CRegExp::asciiOnly)); + std::shared_ptr altRe(new CRegExp(true, CRegExp::asciiOnly)); std::string altReStr = JoynameToRegex(altName); if (!altRe->RegComp(altReStr, CRegExp::StudyRegExp)) CLog::Log(LOGNOTICE, "Ignoring invalid joystick altname regex: '%s'", altReStr.c_str()); @@ -938,7 +939,7 @@ std::string CButtonTranslator::JoynameToRegex(const std::string& joyName) const return "\\Q" + joyName + "\\E"; } -bool CButtonTranslator::AddFamilyRegex(JoystickFamily* family, boost::shared_ptr regex) +bool CButtonTranslator::AddFamilyRegex(JoystickFamily* family, std::shared_ptr regex) { // even though family is a set, this does not prevent the same regex // from being added twice, so we manually match on pattern equality diff --git a/xbmc/input/ButtonTranslator.h b/xbmc/input/ButtonTranslator.h index 3bd47abc0eba8..97cafc41d0457 100644 --- a/xbmc/input/ButtonTranslator.h +++ b/xbmc/input/ButtonTranslator.h @@ -27,6 +27,7 @@ #include #include #include +#include #include "system.h" // for HAS_EVENT_SERVER, HAS_SDL_JOYSTICK #ifdef HAS_EVENT_SERVER @@ -39,7 +40,6 @@ class TiXmlNode; struct AxisConfig; class CRegExp; typedef std::vector AxesConfig; // [] -namespace boost { template class shared_ptr; } struct CButtonAction { @@ -116,7 +116,7 @@ class CButtonTranslator int GetActionCode(int window, int action); int GetActionCode(int window, const CKey &key, std::string &strAction) const; #if defined(HAS_SDL_JOYSTICK) || defined(HAS_EVENT_SERVER) - typedef std::set > JoystickFamily; + typedef std::set > JoystickFamily; typedef std::map JoystickFamilyMap; typedef std::map ActionMap; //