aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris "Koying" Browet <cbro@semperpax.com>2014-12-21 19:22:06 +0100
committerChris "koying" Browet <cbro@semperpax.com>2015-02-10 14:54:44 +0100
commitd3c46d246d932849ffb6641427b1278a9d4cd75b (patch)
treedf8f59db5b16c9907e74c1b85553f52b550c37ca
parente82d519ffe45756114c6ef40af4f583986a268d6 (diff)
CHG: Move to c++11 and use std:shared_ptr rather than boost
Fixes the Nexus Player x86 crashes
-rw-r--r--configure.in4
-rw-r--r--m4/ax_cxx_compile_stdcxx_11.m4142
-rw-r--r--xbmc/Application.cpp4
-rw-r--r--xbmc/Application.h4
-rw-r--r--xbmc/ApplicationMessenger.cpp6
-rw-r--r--xbmc/ApplicationMessenger.h4
-rw-r--r--xbmc/ApplicationPlayer.cpp146
-rw-r--r--xbmc/ApplicationPlayer.h6
-rw-r--r--xbmc/BackgroundInfoLoader.h4
-rw-r--r--xbmc/CueDocument.cpp2
-rw-r--r--xbmc/FileItem.cpp5
-rw-r--r--xbmc/FileItem.h8
-rw-r--r--xbmc/GUIInfoManager.cpp15
-rw-r--r--xbmc/GUIInfoManager.h2
-rw-r--r--xbmc/GUILargeTextureManager.cpp2
-rw-r--r--xbmc/LangInfo.cpp2
-rw-r--r--xbmc/NfoFile.cpp4
-rw-r--r--xbmc/PartyModeManager.h4
-rw-r--r--xbmc/PlayListPlayer.cpp2
-rw-r--r--xbmc/PlayListPlayer.h4
-rw-r--r--xbmc/XBDateTime.cpp2
-rw-r--r--xbmc/addons/AddonInstaller.cpp6
-rw-r--r--xbmc/addons/AddonManager.cpp4
-rw-r--r--xbmc/addons/GUIWindowAddonBrowser.cpp2
-rw-r--r--xbmc/addons/IAddon.h14
-rw-r--r--xbmc/addons/Repository.cpp2
-rw-r--r--xbmc/addons/Repository.h2
-rw-r--r--xbmc/addons/Scraper.cpp1
-rw-r--r--xbmc/addons/Scraper.h2
-rw-r--r--xbmc/addons/Service.cpp4
-rw-r--r--xbmc/addons/Skin.cpp2
-rw-r--r--xbmc/addons/Skin.h2
-rw-r--r--xbmc/cdrip/CDDARipJob.cpp6
-rw-r--r--xbmc/cdrip/CDDARipper.cpp2
-rw-r--r--xbmc/cdrip/Encoder.cpp2
-rw-r--r--xbmc/cdrip/Encoder.h6
-rw-r--r--xbmc/cores/AudioEngine/AESinkFactory.cpp2
-rw-r--r--xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp1
-rw-r--r--xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResamplePi.cpp1
-rw-r--r--xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp1
-rw-r--r--xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp1
-rw-r--r--xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp2
-rw-r--r--xbmc/cores/AudioEngine/Sinks/AESinkPi.cpp1
-rw-r--r--xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp1
-rw-r--r--xbmc/cores/AudioEngine/Utils/AEChannelInfo.cpp1
-rw-r--r--xbmc/cores/AudioEngine/Utils/AEStreamInfo.cpp1
-rw-r--r--xbmc/cores/AudioEngine/Utils/AEUtil.cpp2
-rw-r--r--xbmc/cores/DllLoader/DllLoader.cpp3
-rw-r--r--xbmc/cores/VideoRenderers/DXVA.cpp5
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthrough.cpp2
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlay.h2
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp18
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.h20
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp4
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.cpp2
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp2
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Video/MMALCodec.h4
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h1
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Video/libstagefrightICS/StageFrightVideoPrivate.h8
-rw-r--r--xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxCC.cpp2
-rw-r--r--xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.h2
-rw-r--r--xbmc/cores/dvdplayer/DVDDemuxers/DVDFactoryDemuxer.cpp2
-rw-r--r--xbmc/cores/dvdplayer/DVDFileInfo.cpp2
-rw-r--r--xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStream.h2
-rw-r--r--xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp2
-rw-r--r--xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.h4
-rw-r--r--xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamStack.cpp1
-rw-r--r--xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamStack.h4
-rw-r--r--xbmc/cores/dvdplayer/DVDMessage.cpp1
-rw-r--r--xbmc/cores/dvdplayer/DVDMessageQueue.h1
-rw-r--r--xbmc/cores/paplayer/NSFCodec.cpp1
-rw-r--r--xbmc/dbwrappers/DatabaseQuery.cpp4
-rw-r--r--xbmc/dbwrappers/DatabaseQuery.h6
-rw-r--r--xbmc/dbwrappers/mysqldataset.cpp1
-rw-r--r--xbmc/dialogs/GUIDialogBusy.cpp6
-rw-r--r--xbmc/dialogs/GUIDialogSmartPlaylistEditor.cpp4
-rw-r--r--xbmc/epg/EpgDatabase.cpp1
-rw-r--r--xbmc/epg/EpgInfoTag.h4
-rw-r--r--xbmc/epg/GUIEPGGridContainer.cpp2
-rw-r--r--xbmc/filesystem/AddonsDirectory.cpp6
-rw-r--r--xbmc/filesystem/AddonsDirectory.h2
-rw-r--r--xbmc/filesystem/BlurayDirectory.cpp2
-rw-r--r--xbmc/filesystem/CDDAFile.cpp2
-rw-r--r--xbmc/filesystem/CDDAFile.h2
-rw-r--r--xbmc/filesystem/CacheStrategy.cpp3
-rw-r--r--xbmc/filesystem/CircularCache.cpp1
-rw-r--r--xbmc/filesystem/CurlFile.cpp1
-rw-r--r--xbmc/filesystem/Directory.cpp14
-rw-r--r--xbmc/filesystem/DirectoryCache.cpp2
-rw-r--r--xbmc/filesystem/DirectoryHistory.cpp2
-rw-r--r--xbmc/filesystem/FileCache.cpp3
-rw-r--r--xbmc/filesystem/HTSPDirectory.cpp2
-rw-r--r--xbmc/filesystem/HTSPDirectory.h4
-rw-r--r--xbmc/filesystem/SFTPFile.h4
-rw-r--r--xbmc/filesystem/SMBFile.cpp4
-rw-r--r--xbmc/filesystem/SpecialProtocol.cpp1
-rw-r--r--xbmc/filesystem/ZeroconfDirectory.cpp1
-rw-r--r--xbmc/filesystem/iso9660.cpp1
-rw-r--r--xbmc/filesystem/win32/Win32Directory.cpp2
-rw-r--r--xbmc/filesystem/win32/Win32File.cpp1
-rw-r--r--xbmc/filesystem/win32/Win32SMBDirectory.cpp2
-rw-r--r--xbmc/filesystem/win32/Win32SMBFile.cpp1
-rw-r--r--xbmc/guilib/DDSImage.cpp1
-rw-r--r--xbmc/guilib/GUIBaseContainer.cpp4
-rw-r--r--xbmc/guilib/GUIControlGroup.cpp2
-rw-r--r--xbmc/guilib/GUIFontCache.h4
-rw-r--r--xbmc/guilib/GUIFontTTF.cpp8
-rw-r--r--xbmc/guilib/GUIImage.cpp2
-rw-r--r--xbmc/guilib/GUIMessage.h4
-rw-r--r--xbmc/guilib/GUIPanelContainer.cpp2
-rw-r--r--xbmc/guilib/GUIStaticItem.h2
-rw-r--r--xbmc/guilib/GUITextureGLES.cpp2
-rw-r--r--xbmc/guilib/GUIVisualisationControl.cpp2
-rw-r--r--xbmc/guilib/GUIWindow.h4
-rw-r--r--xbmc/guilib/IGUIContainer.h4
-rw-r--r--xbmc/guilib/VisibleEffect.cpp28
-rw-r--r--xbmc/guilib/VisibleEffect.h10
-rw-r--r--xbmc/input/ButtonTranslator.cpp11
-rw-r--r--xbmc/input/ButtonTranslator.h8
-rw-r--r--xbmc/input/KeyboardLayout.cpp1
-rw-r--r--xbmc/input/SDLJoystick.cpp1
-rw-r--r--xbmc/input/SDLJoystick.h2
-rw-r--r--xbmc/input/windows/WINJoystick.cpp2
-rw-r--r--xbmc/input/windows/WINJoystick.h2
-rw-r--r--xbmc/interfaces/Builtins.cpp2
-rw-r--r--xbmc/interfaces/generic/ScriptInvocationManager.h4
-rw-r--r--xbmc/interfaces/info/InfoBool.h4
-rw-r--r--xbmc/interfaces/info/InfoExpression.cpp20
-rw-r--r--xbmc/interfaces/info/InfoExpression.h4
-rw-r--r--xbmc/interfaces/json-rpc/AddonsOperations.cpp2
-rw-r--r--xbmc/interfaces/json-rpc/JSONServiceDescription.h4
-rw-r--r--xbmc/interfaces/json-rpc/PlayerOperations.h2
-rw-r--r--xbmc/interfaces/legacy/ListItem.cpp1
-rw-r--r--xbmc/interfaces/legacy/Monitor.cpp1
-rw-r--r--xbmc/interfaces/python/XBPython.h2
-rw-r--r--xbmc/linux/DBusReserve.cpp1
-rw-r--r--xbmc/linux/LinuxTimezone.cpp2
-rw-r--r--xbmc/linux/PosixMountProvider.cpp3
-rw-r--r--xbmc/linux/XFileUtils.cpp2
-rw-r--r--xbmc/linux/XHandle.cpp2
-rw-r--r--xbmc/listproviders/DirectoryProvider.cpp13
-rw-r--r--xbmc/listproviders/IListProvider.h4
-rw-r--r--xbmc/listproviders/StaticProvider.cpp2
-rw-r--r--xbmc/music/Album.cpp2
-rw-r--r--xbmc/music/Artist.cpp2
-rw-r--r--xbmc/music/MusicDatabase.cpp6
-rw-r--r--xbmc/music/infoscanner/MusicInfoScanner.cpp4
-rw-r--r--xbmc/music/karaoke/karaokelyricstextustar.cpp1
-rw-r--r--xbmc/music/tags/MusicInfoTagLoaderASAP.cpp1
-rw-r--r--xbmc/music/tags/MusicInfoTagLoaderSPC.cpp1
-rw-r--r--xbmc/music/windows/GUIWindowMusicNav.cpp2
-rw-r--r--xbmc/network/EventServer.cpp1
-rw-r--r--xbmc/network/WebServer.cpp7
-rw-r--r--xbmc/network/ZeroconfBrowser.cpp1
-rw-r--r--xbmc/network/linux/NetworkLinux.cpp2
-rw-r--r--xbmc/network/linux/ZeroconfAvahi.h4
-rw-r--r--xbmc/network/upnp/UPnPInternal.cpp2
-rw-r--r--xbmc/pictures/Picture.cpp2
-rw-r--r--xbmc/pictures/PictureInfoTag.cpp3
-rw-r--r--xbmc/playlists/PlayList.cpp3
-rw-r--r--xbmc/playlists/PlayList.h4
-rw-r--r--xbmc/playlists/SmartPlayList.cpp6
-rw-r--r--xbmc/playlists/SmartPlayList.h2
-rw-r--r--xbmc/pvr/PVRGUIInfo.h2
-rw-r--r--xbmc/pvr/PVRManager.h4
-rw-r--r--xbmc/pvr/addons/PVRClient.h2
-rw-r--r--xbmc/pvr/addons/PVRClients.cpp2
-rw-r--r--xbmc/pvr/addons/PVRClients.h2
-rw-r--r--xbmc/pvr/channels/PVRChannel.h6
-rw-r--r--xbmc/pvr/channels/PVRChannelGroup.h4
-rw-r--r--xbmc/pvr/dialogs/GUIDialogPVRGuideInfo.h4
-rw-r--r--xbmc/pvr/recordings/PVRRecording.h2
-rw-r--r--xbmc/pvr/timers/PVRTimerInfoTag.h8
-rw-r--r--xbmc/settings/SettingUtils.cpp4
-rw-r--r--xbmc/settings/SettingUtils.h6
-rw-r--r--xbmc/settings/Settings.h2
-rw-r--r--xbmc/settings/dialogs/GUIDialogContentSettings.cpp6
-rw-r--r--xbmc/settings/dialogs/GUIDialogSettingsBase.h2
-rw-r--r--xbmc/settings/lib/Setting.h4
-rw-r--r--xbmc/settings/lib/SettingDependency.cpp4
-rw-r--r--xbmc/settings/lib/SettingDependency.h4
-rw-r--r--xbmc/settings/lib/SettingsManager.cpp7
-rw-r--r--xbmc/settings/lib/SettingsManager.h4
-rw-r--r--xbmc/storage/DetectDVDType.h4
-rw-r--r--xbmc/storage/MediaManager.cpp2
-rw-r--r--xbmc/storage/android/AndroidStorageProvider.cpp9
-rw-r--r--xbmc/storage/cdioSupport.cpp6
-rw-r--r--xbmc/storage/cdioSupport.h8
-rw-r--r--xbmc/utils/Archive.cpp1
-rw-r--r--xbmc/utils/BooleanLogic.h6
-rw-r--r--xbmc/utils/CPUInfo.cpp2
-rw-r--r--xbmc/utils/CharsetConverter.cpp1
-rw-r--r--xbmc/utils/Fanart.cpp3
-rw-r--r--xbmc/utils/GlobalsHandling.h18
-rw-r--r--xbmc/utils/HttpRangeUtils.cpp2
-rw-r--r--xbmc/utils/JobManager.cpp2
-rw-r--r--xbmc/utils/LabelFormatter.cpp4
-rw-r--r--xbmc/utils/Observer.cpp2
-rw-r--r--xbmc/utils/SortUtils.cpp2
-rw-r--r--xbmc/utils/SortUtils.h4
-rw-r--r--xbmc/utils/StringUtils.cpp1
-rw-r--r--xbmc/utils/URIUtils.cpp1
-rw-r--r--xbmc/utils/test/TestGlobalsHandling.cpp2
-rw-r--r--xbmc/video/VideoDatabase.cpp6
-rw-r--r--xbmc/video/VideoInfoTag.cpp1
-rw-r--r--xbmc/video/VideoThumbLoader.cpp2
-rw-r--r--xbmc/video/dialogs/GUIDialogVideoInfo.cpp2
-rw-r--r--xbmc/view/GUIViewState.cpp2
-rw-r--r--xbmc/win32/pch.h2
-rw-r--r--xbmc/windowing/android/WinEventsAndroid.cpp2
-rw-r--r--xbmc/windowing/egl/EGLNativeTypeIMX.cpp2
-rw-r--r--xbmc/windows/GUIMediaWindow.cpp4
-rw-r--r--xbmc/windows/GUIWindowScreensaver.cpp2
-rw-r--r--xbmc/windows/GUIWindowScreensaver.h2
214 files changed, 673 insertions, 379 deletions
diff --git a/configure.in b/configure.in
index 121f41c9a6..0f9cda7001 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 0000000000..2bc054d981
--- /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 <bkoz@redhat.com>
+# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
+# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
+# Copyright (c) 2014 Alexey Sokolov <sokolov@google.com>
+#
+# 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 <typename T>
+ 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<check<bool>> right_angle_brackets;
+
+ int a;
+ decltype(a) b;
+
+ typedef check<int> check_type;
+ check_type c;
+ check_type&& cr = static_cast<check_type&&>(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 b66f739434..3234480980 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::CSkinInfo>(addon)))
+ if (LoadSkin(std::dynamic_pointer_cast<ADDON::CSkinInfo>(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 b7d9308276..053f428c7a 100644
--- a/xbmc/Application.h
+++ b/xbmc/Application.h
@@ -37,7 +37,7 @@ namespace ADDON
{
class CSkinInfo;
class IAddon;
- typedef boost::shared_ptr<IAddon> AddonPtr;
+ typedef std::shared_ptr<IAddon> AddonPtr;
}
namespace MEDIA_DETECT
@@ -408,7 +408,7 @@ protected:
virtual bool OnSettingUpdate(CSetting* &setting, const char *oldSettingId, const TiXmlNode *oldSettingNode);
bool LoadSkin(const std::string& skinID);
- bool LoadSkin(const boost::shared_ptr<ADDON::CSkinInfo>& skin);
+ bool LoadSkin(const std::shared_ptr<ADDON::CSkinInfo>& skin);
/*!
\brief Delegates the action to all registered action handlers.
diff --git a/xbmc/ApplicationMessenger.cpp b/xbmc/ApplicationMessenger.cpp
index 344886b51f..d698b02a06 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<CEvent> waitEvent;
+ std::shared_ptr<CEvent> 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<CEvent> waitEvent = pMsg->waitEvent;
+ std::shared_ptr<CEvent> 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<CEvent> waitEvent = pMsg->waitEvent;
+ std::shared_ptr<CEvent> waitEvent = pMsg->waitEvent;
lock.Leave(); // <- see the large comment in SendMessage ^
ProcessMessage(pMsg);
diff --git a/xbmc/ApplicationMessenger.h b/xbmc/ApplicationMessenger.h
index dc629b5052..36c90e403c 100644
--- a/xbmc/ApplicationMessenger.h
+++ b/xbmc/ApplicationMessenger.h
@@ -22,7 +22,7 @@
#include "guilib/WindowIDs.h"
#include "threads/Thread.h"
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <queue>
#include "utils/GlobalsHandling.h"
@@ -121,7 +121,7 @@ typedef struct
int param2;
std::string strParam;
std::vector<std::string> params;
- boost::shared_ptr<CEvent> waitEvent;
+ std::shared_ptr<CEvent> waitEvent;
void* lpVoid;
}
ThreadMessage;
diff --git a/xbmc/ApplicationPlayer.cpp b/xbmc/ApplicationPlayer.cpp
index 5db9f17f01..15a3241713 100644
--- a/xbmc/ApplicationPlayer.cpp
+++ b/xbmc/ApplicationPlayer.cpp
@@ -29,7 +29,7 @@ CApplicationPlayer::CApplicationPlayer()
m_eCurrentPlayer = EPC_NONE;
}
-boost::shared_ptr<IPlayer> CApplicationPlayer::GetInternal() const
+std::shared_ptr<IPlayer> CApplicationPlayer::GetInternal() const
{
CSingleLock lock(m_player_lock);
return m_pPlayer;
@@ -37,7 +37,7 @@ boost::shared_ptr<IPlayer> CApplicationPlayer::GetInternal() const
void CApplicationPlayer::ClosePlayer()
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
{
CloseFile();
@@ -49,7 +49,7 @@ void CApplicationPlayer::ClosePlayer()
void CApplicationPlayer::CloseFile(bool reopen)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
{
++m_iPlayerOPSeq;
@@ -59,7 +59,7 @@ void CApplicationPlayer::CloseFile(bool reopen)
void CApplicationPlayer::ClosePlayerGapless(PLAYERCOREID newCore)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> 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<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> 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<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
return player != NULL;
}
int CApplicationPlayer::GetChapter()
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
return player->GetChapter();
else
@@ -124,7 +124,7 @@ int CApplicationPlayer::GetChapter()
int CApplicationPlayer::GetChapterCount()
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
return player->GetChapterCount();
else
@@ -133,32 +133,32 @@ int CApplicationPlayer::GetChapterCount()
void CApplicationPlayer::GetChapterName(std::string& strChapterName)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
player->GetChapterName(strChapterName);
}
bool CApplicationPlayer::HasAudio() const
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
return (player && player->HasAudio());
}
bool CApplicationPlayer::HasVideo() const
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
return (player && player->HasVideo());
}
bool CApplicationPlayer::IsPaused() const
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
return (player && player->IsPaused());
}
bool CApplicationPlayer::IsPlaying() const
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
return (player && player->IsPlaying());
}
@@ -179,73 +179,73 @@ bool CApplicationPlayer::IsPlayingVideo() const
void CApplicationPlayer::Pause()
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
player->Pause();
}
bool CApplicationPlayer::ControlsVolume() const
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
return (player && player->ControlsVolume());
}
void CApplicationPlayer::SetMute(bool bOnOff)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
player->SetMute(bOnOff);
}
void CApplicationPlayer::SetVolume(float volume)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
player->SetVolume(volume);
}
void CApplicationPlayer::Seek(bool bPlus, bool bLargeStep, bool bChapterOverride)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
player->Seek(bPlus, bLargeStep, bChapterOverride);
}
void CApplicationPlayer::SeekPercentage(float fPercent)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
player->SeekPercentage(fPercent);
}
bool CApplicationPlayer::IsPassthrough() const
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
return (player && player->IsPassthrough());
}
bool CApplicationPlayer::CanSeek()
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
return (player && player->CanSeek());
}
bool CApplicationPlayer::SeekScene(bool bPlus)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
return (player && player->SeekScene(bPlus));
}
void CApplicationPlayer::SeekTime(int64_t iTime)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
player->SeekTime(iTime);
}
std::string CApplicationPlayer::GetPlayingTitle()
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
return player->GetPlayingTitle();
else
@@ -254,7 +254,7 @@ std::string CApplicationPlayer::GetPlayingTitle()
int64_t CApplicationPlayer::GetTime() const
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
return player->GetTime();
else
@@ -263,25 +263,25 @@ int64_t CApplicationPlayer::GetTime() const
bool CApplicationPlayer::IsCaching() const
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
return (player && player->IsCaching());
}
bool CApplicationPlayer::IsInMenu() const
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
return (player && player->IsInMenu());
}
bool CApplicationPlayer::HasMenu() const
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
return (player && player->HasMenu());
}
int CApplicationPlayer::GetCacheLevel() const
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
return player->GetCacheLevel();
else
@@ -290,7 +290,7 @@ int CApplicationPlayer::GetCacheLevel() const
int CApplicationPlayer::GetSubtitleCount()
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> 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<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> 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<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
{
m_iSubtitleStream = player->GetSubtitle();
@@ -331,31 +331,31 @@ int CApplicationPlayer::GetSubtitle()
bool CApplicationPlayer::GetSubtitleVisible()
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
return (player && player->GetSubtitleVisible());
}
bool CApplicationPlayer::CanRecord()
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
return (player && player->CanRecord());
}
bool CApplicationPlayer::CanPause()
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
return (player && player->CanPause());
}
bool CApplicationPlayer::IsRecording() const
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
return (player && player->IsRecording());
}
TextCacheStruct_t* CApplicationPlayer::GetTeletextCache()
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
return player->GetTeletextCache();
else
@@ -364,7 +364,7 @@ TextCacheStruct_t* CApplicationPlayer::GetTeletextCache()
int64_t CApplicationPlayer::GetTotalTime() const
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
return player->GetTotalTime();
else
@@ -373,7 +373,7 @@ int64_t CApplicationPlayer::GetTotalTime() const
float CApplicationPlayer::GetPercentage() const
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
return player->GetPercentage();
else
@@ -382,7 +382,7 @@ float CApplicationPlayer::GetPercentage() const
float CApplicationPlayer::GetCachePercentage() const
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
return player->GetCachePercentage();
else
@@ -391,21 +391,21 @@ float CApplicationPlayer::GetCachePercentage() const
void CApplicationPlayer::ToFFRW(int iSpeed)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
player->ToFFRW(iSpeed);
}
void CApplicationPlayer::DoAudioWork()
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
player->DoAudioWork();
}
std::string CApplicationPlayer::GetPlayerState()
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> 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<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
return (player && player->QueueNextFile(file));
}
bool CApplicationPlayer::GetStreamDetails(CStreamDetails &details)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
return (player && player->GetStreamDetails(details));
}
bool CApplicationPlayer::SetPlayerState(const std::string& state)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
return (player && player->SetPlayerState(state));
}
void CApplicationPlayer::OnNothingToQueueNotify()
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
player->OnNothingToQueueNotify();
}
void CApplicationPlayer::GetVideoStreamInfo(SPlayerVideoStreamInfo &info)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
player->GetVideoStreamInfo(info);
}
void CApplicationPlayer::GetAudioStreamInfo(int index, SPlayerAudioStreamInfo &info)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
player->GetAudioStreamInfo(index, info);
}
bool CApplicationPlayer::OnAction(const CAction &action)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
return (player && player->OnAction(action));
}
bool CApplicationPlayer::Record(bool bOnOff)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
return (player && player->Record(bOnOff));
}
int CApplicationPlayer::GetAudioStreamCount()
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
return player->GetAudioStreamCount();
else
@@ -474,7 +474,7 @@ int CApplicationPlayer::GetAudioStreamCount()
void CApplicationPlayer::SetAudioStream(int iStream)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> 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<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
player->GetSubtitleStreamInfo(index, info);
}
void CApplicationPlayer::SetSubtitle(int iStream)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
{
player->SetSubtitle(iStream);
@@ -505,7 +505,7 @@ void CApplicationPlayer::SetSubtitle(int iStream)
void CApplicationPlayer::SetSubtitleVisible(bool bVisible)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> 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<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> 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<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
player->SetSubTitleDelay(fValue);
}
void CApplicationPlayer::SetAVDelay(float fValue)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
player->SetAVDelay(fValue);
}
void CApplicationPlayer::SetDynamicRangeCompression(long drc)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
player->SetDynamicRangeCompression(drc);
}
bool CApplicationPlayer::SwitchChannel(PVR::CPVRChannel &channel)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
return (player && player->SwitchChannel(channel));
}
void CApplicationPlayer::LoadPage(int p, int sp, unsigned char* buffer)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
player->LoadPage(p, sp, buffer);
}
void CApplicationPlayer::GetAudioCapabilities(std::vector<int> &audioCaps)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
player->GetAudioCapabilities(audioCaps);
}
void CApplicationPlayer::GetSubtitleCapabilities(std::vector<int> &subCaps)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
player->GetSubtitleCapabilities(subCaps);
}
void CApplicationPlayer::GetAudioInfo(std::string& strAudioInfo)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
player->GetAudioInfo(strAudioInfo);
}
void CApplicationPlayer::GetVideoInfo(std::string& strVideoInfo)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
player->GetVideoInfo(strVideoInfo);
}
void CApplicationPlayer::GetGeneralInfo(std::string& strVideoInfo)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
player->GetGeneralInfo(strVideoInfo);
}
int CApplicationPlayer::SeekChapter(int iChapter)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
return player->SeekChapter(iChapter);
else
@@ -603,35 +603,35 @@ int CApplicationPlayer::SeekChapter(int iChapter)
void CApplicationPlayer::GetRenderFeatures(std::vector<int> &renderFeatures)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
player->OMXGetRenderFeatures(renderFeatures);
}
void CApplicationPlayer::GetDeinterlaceMethods(std::vector<int> &deinterlaceMethods)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
player->OMXGetDeinterlaceMethods(deinterlaceMethods);
}
void CApplicationPlayer::GetDeinterlaceModes(std::vector<int> &deinterlaceModes)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
player->OMXGetDeinterlaceModes(deinterlaceModes);
}
void CApplicationPlayer::GetScalingMethods(std::vector<int> &scalingMethods)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (player)
player->OMXGetScalingMethods(scalingMethods);
}
void CApplicationPlayer::SetPlaySpeed(int iSpeed, bool bApplicationMuted)
{
- boost::shared_ptr<IPlayer> player = GetInternal();
+ std::shared_ptr<IPlayer> player = GetInternal();
if (!player)
return;
diff --git a/xbmc/ApplicationPlayer.h b/xbmc/ApplicationPlayer.h
index 4216636276..eea702ac21 100644
--- a/xbmc/ApplicationPlayer.h
+++ b/xbmc/ApplicationPlayer.h
@@ -20,7 +20,7 @@
*
*/
-#include <boost/shared_ptr.hpp>
+#include <memory>
#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<IPlayer> m_pPlayer;
+ std::shared_ptr<IPlayer> 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 @@ public:
void ClosePlayerGapless(PLAYERCOREID newCore);
void CreatePlayer(PLAYERCOREID newCore, IPlayerCallback& callback);
PLAYERCOREID GetCurrentPlayer() const { return m_eCurrentPlayer; }
- boost::shared_ptr<IPlayer> GetInternal() const;
+ std::shared_ptr<IPlayer> 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 5fad3f0605..6839d9e6f0 100644
--- a/xbmc/BackgroundInfoLoader.h
+++ b/xbmc/BackgroundInfoLoader.h
@@ -25,9 +25,9 @@
#include "threads/CriticalSection.h"
#include <vector>
-#include "boost/shared_ptr.hpp"
+#include <memory>
-class CFileItem; typedef boost::shared_ptr<CFileItem> CFileItemPtr;
+class CFileItem; typedef std::shared_ptr<CFileItem> CFileItemPtr;
class CFileItemList;
class IBackgroundLoaderObserver
diff --git a/xbmc/CueDocument.cpp b/xbmc/CueDocument.cpp
index d22d317a29..c7afad718c 100644
--- a/xbmc/CueDocument.cpp
+++ b/xbmc/CueDocument.cpp
@@ -52,6 +52,8 @@
//
////////////////////////////////////////////////////////////////////////////////////
+#include <cstdlib>
+
#include "CueDocument.h"
#include "utils/log.h"
#include "utils/URIUtils.h"
diff --git a/xbmc/FileItem.cpp b/xbmc/FileItem.cpp
index 32c88249a6..f8607cf145 100644
--- a/xbmc/FileItem.cpp
+++ b/xbmc/FileItem.cpp
@@ -18,6 +18,8 @@
*
*/
+#include <cstdlib>
+
#include "FileItem.h"
#include "guilib/LocalizeStrings.h"
#include "utils/StringUtils.h"
@@ -63,6 +65,7 @@
#endif
#include <assert.h>
+#include <algorithm>
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<SortItem>(new SortItem);
+ sortItems[index] = std::shared_ptr<SortItem>(new SortItem);
m_items[index]->ToSortable(*sortItems[index], fields);
(*sortItems[index])[FieldId] = index;
}
diff --git a/xbmc/FileItem.h b/xbmc/FileItem.h
index 4f49b13868..e7066652df 100644
--- a/xbmc/FileItem.h
+++ b/xbmc/FileItem.h
@@ -34,7 +34,7 @@
#include "threads/CriticalSection.h"
#include <vector>
-#include "boost/shared_ptr.hpp"
+#include <memory>
namespace MUSIC_INFO
{
@@ -44,14 +44,14 @@ class CVideoInfoTag;
namespace EPG
{
class CEpgInfoTag;
- typedef boost::shared_ptr<EPG::CEpgInfoTag> CEpgInfoTagPtr;
+ typedef std::shared_ptr<EPG::CEpgInfoTag> CEpgInfoTagPtr;
}
namespace PVR
{
class CPVRChannel;
class CPVRRecording;
class CPVRTimerInfoTag;
- typedef boost::shared_ptr<PVR::CPVRRecording> CPVRRecordingPtr;
+ typedef std::shared_ptr<PVR::CPVRRecording> CPVRRecordingPtr;
}
class CPictureInfoTag;
@@ -495,7 +495,7 @@ private:
\brief A shared pointer to CFileItem
\sa CFileItem
*/
-typedef boost::shared_ptr<CFileItem> CFileItemPtr;
+typedef std::shared_ptr<CFileItem> CFileItemPtr;
/*!
\brief A vector of pointer to CFileItem
diff --git a/xbmc/GUIInfoManager.cpp b/xbmc/GUIInfoManager.cpp
index 18583bf351..ad0b29d4d6 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 <memory>
+#include <functional>
#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<CFileItem>(message.GetItem());
+ CFileItemPtr item = std::static_pointer_cast<CFileItem>(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<InfoExpression>(condition, context));
+ m_bools.push_back(std::make_shared<InfoExpression>(condition, context));
else
- m_bools.push_back(boost::make_shared<InfoSingle>(condition, context));
+ m_bools.push_back(std::make_shared<InfoSingle>(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<CFileItem>(((IGUIContainer *)control)->GetListItem(0));
+ CFileItemPtr item = std::static_pointer_cast<CFileItem>(((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<CFileItem>(((IGUIContainer *)control)->GetListItem(info.GetData2(), info.GetInfoFlag()));
+ item = std::static_pointer_cast<CFileItem>(((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<CFileItem>(((IGUIContainer *)control)->GetListItem(info.GetData2(), info.GetInfoFlag()));
+ item = std::static_pointer_cast<CFileItem>(((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 0bf5f54db0..b387cd7be5 100644
--- a/xbmc/GUIInfoManager.h
+++ b/xbmc/GUIInfoManager.h
@@ -676,7 +676,7 @@ class CGUIWindow;
namespace EPG
{
class CEpgInfoTag;
- typedef boost::shared_ptr<EPG::CEpgInfoTag> CEpgInfoTagPtr;
+ typedef std::shared_ptr<EPG::CEpgInfoTag> CEpgInfoTagPtr;
}
// Info Flags
diff --git a/xbmc/GUILargeTextureManager.cpp b/xbmc/GUILargeTextureManager.cpp
index 4c965a5df4..d7255a66de 100644
--- a/xbmc/GUILargeTextureManager.cpp
+++ b/xbmc/GUILargeTextureManager.cpp
@@ -29,6 +29,8 @@
#include "utils/log.h"
#include "TextureCache.h"
+#include <cassert>
+
using namespace std;
diff --git a/xbmc/LangInfo.cpp b/xbmc/LangInfo.cpp
index 5831d8d729..208cd2ccd6 100644
--- a/xbmc/LangInfo.cpp
+++ b/xbmc/LangInfo.cpp
@@ -37,6 +37,8 @@
#include "utils/XBMCTinyXML.h"
#include "utils/XMLUtils.h"
+#include <algorithm>
+
using namespace std;
using namespace PVR;
diff --git a/xbmc/NfoFile.cpp b/xbmc/NfoFile.cpp
index ead5f7d017..930796812e 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<CScraper>(addon);
+ defaultScraper = std::dynamic_pointer_cast<CScraper>(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<CScraper>(addons[i]);
+ ScraperPtr scraper = std::dynamic_pointer_cast<CScraper>(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 b7ac7b9b13..0982679c41 100644
--- a/xbmc/PartyModeManager.h
+++ b/xbmc/PartyModeManager.h
@@ -22,9 +22,9 @@
#include <string>
#include <vector>
-#include <boost/shared_ptr.hpp>
+#include <memory>
-class CFileItem; typedef boost::shared_ptr<CFileItem> CFileItemPtr;
+class CFileItem; typedef std::shared_ptr<CFileItem> CFileItemPtr;
class CFileItemList;
namespace PLAYLIST
{
diff --git a/xbmc/PlayListPlayer.cpp b/xbmc/PlayListPlayer.cpp
index c6f210e9fb..9a1ddb9fc4 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<CFileItem>(message.GetItem());
+ CFileItemPtr item = std::static_pointer_cast<CFileItem>(message.GetItem());
playlist.UpdateItem(item.get());
}
}
diff --git a/xbmc/PlayListPlayer.h b/xbmc/PlayListPlayer.h
index 6903f8242e..2167a7a01b 100644
--- a/xbmc/PlayListPlayer.h
+++ b/xbmc/PlayListPlayer.h
@@ -20,7 +20,7 @@
*/
#include "guilib/IMsgTargetCallback.h"
-#include <boost/shared_ptr.hpp>
+#include <memory>
#define PLAYLIST_NONE -1
#define PLAYLIST_MUSIC 0
@@ -28,7 +28,7 @@
#define PLAYLIST_PICTURE 2
class CAction;
-class CFileItem; typedef boost::shared_ptr<CFileItem> CFileItemPtr;
+class CFileItem; typedef std::shared_ptr<CFileItem> CFileItemPtr;
class CFileItemList;
class CVariant;
diff --git a/xbmc/XBDateTime.cpp b/xbmc/XBDateTime.cpp
index bc8175058f..7caf8d15d8 100644
--- a/xbmc/XBDateTime.cpp
+++ b/xbmc/XBDateTime.cpp
@@ -18,6 +18,8 @@
*
*/
+#include <cstdlib>
+
#include "XBDateTime.h"
#include "LangInfo.h"
#include "guilib/LocalizeStrings.h"
diff --git a/xbmc/addons/AddonInstaller.cpp b/xbmc/addons/AddonInstaller.cpp
index c61da1bf84..26a9763b75 100644
--- a/xbmc/addons/AddonInstaller.cpp
+++ b/xbmc/addons/AddonInstaller.cpp
@@ -40,6 +40,8 @@
#include "dialogs/GUIDialogProgress.h"
#include "URL.h"
+#include <functional>
+
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<CRepository>(ptr);
+ RepositoryPtr therepo = std::dynamic_pointer_cast<CRepository>(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<CRepository>(repoPtr);
+ RepositoryPtr therepo = std::dynamic_pointer_cast<CRepository>(repoPtr);
if (therepo && !therepo->Props().libname.empty())
{
CFileItemList dummy;
diff --git a/xbmc/addons/AddonManager.cpp b/xbmc/addons/AddonManager.cpp
index 9c93c0d2ab..3423b4b506 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<CService> service = boost::dynamic_pointer_cast<CService>(*it);
+ std::shared_ptr<CService> service = std::dynamic_pointer_cast<CService>(*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<CService> service = boost::dynamic_pointer_cast<CService>(*it);
+ std::shared_ptr<CService> service = std::dynamic_pointer_cast<CService>(*it);
if (service)
{
if ( (onlylogin && service->GetStartOption() == CService::LOGIN)
diff --git a/xbmc/addons/GUIWindowAddonBrowser.cpp b/xbmc/addons/GUIWindowAddonBrowser.cpp
index 8c62d8496b..b3b73d4c70 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<CRepository>(addon);
+ RepositoryPtr repo = std::dynamic_pointer_cast<CRepository>(addon);
CAddonInstaller::Get().UpdateRepos(true);
return true;
}
diff --git a/xbmc/addons/IAddon.h b/xbmc/addons/IAddon.h
index ea71126614..4da99ebd1c 100644
--- a/xbmc/addons/IAddon.h
+++ b/xbmc/addons/IAddon.h
@@ -18,9 +18,7 @@
* <http://www.gnu.org/licenses/>.
*
*/
-#include "boost/shared_ptr.hpp"
-
-#include <boost/enable_shared_from_this.hpp>
+#include <memory>
#include <map>
#include <set>
@@ -64,13 +62,13 @@ namespace ADDON
} TYPE;
class IAddon;
- typedef boost::shared_ptr<IAddon> AddonPtr;
+ typedef std::shared_ptr<IAddon> AddonPtr;
class CVisualisation;
- typedef boost::shared_ptr<CVisualisation> VizPtr;
+ typedef std::shared_ptr<CVisualisation> VizPtr;
class CSkinInfo;
- typedef boost::shared_ptr<CSkinInfo> SkinPtr;
+ typedef std::shared_ptr<CSkinInfo> SkinPtr;
class CPluginSource;
- typedef boost::shared_ptr<CPluginSource> PluginPtr;
+ typedef std::shared_ptr<CPluginSource> PluginPtr;
class CAddonMgr;
class AddonVersion;
@@ -78,7 +76,7 @@ namespace ADDON
typedef std::map<std::string, std::string> InfoMap;
class AddonProps;
- class IAddon : public boost::enable_shared_from_this<IAddon>
+ class IAddon : public std::enable_shared_from_this<IAddon>
{
public:
virtual ~IAddon() {};
diff --git a/xbmc/addons/Repository.cpp b/xbmc/addons/Repository.cpp
index 0d0b75a560..c7e8a5bc33 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<CRepository>(*i);
+ const RepositoryPtr repo = std::dynamic_pointer_cast<CRepository>(*i);
VECADDONS newAddons;
if (GrabAddons(repo, newAddons))
MergeAddons(addons, newAddons);
diff --git a/xbmc/addons/Repository.h b/xbmc/addons/Repository.h
index 8ac282c608..339dbf5f11 100644
--- a/xbmc/addons/Repository.h
+++ b/xbmc/addons/Repository.h
@@ -25,7 +25,7 @@
namespace ADDON
{
class CRepository;
- typedef boost::shared_ptr<CRepository> RepositoryPtr;
+ typedef std::shared_ptr<CRepository> RepositoryPtr;
class CRepository : public CAddon
{
public:
diff --git a/xbmc/addons/Scraper.cpp b/xbmc/addons/Scraper.cpp
index d6855853e6..7d327a0693 100644
--- a/xbmc/addons/Scraper.cpp
+++ b/xbmc/addons/Scraper.cpp
@@ -42,6 +42,7 @@
#include "URL.h"
#include <sstream>
+#include <algorithm>
using namespace std;
using namespace XFILE;
diff --git a/xbmc/addons/Scraper.h b/xbmc/addons/Scraper.h
index c7274f2844..7302972202 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<CScraper> ScraperPtr;
+typedef std::shared_ptr<CScraper> 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 c406b11272..2f5c38c8d3 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<CService> service = boost::dynamic_pointer_cast<CService>(localAddon);
+ std::shared_ptr<CService> service = std::dynamic_pointer_cast<CService>(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<CService> service = boost::dynamic_pointer_cast<CService>(localAddon);
+ std::shared_ptr<CService> service = std::dynamic_pointer_cast<CService>(localAddon);
if (service)
service->Start();
}
diff --git a/xbmc/addons/Skin.cpp b/xbmc/addons/Skin.cpp
index 351a821663..0b343033ba 100644
--- a/xbmc/addons/Skin.cpp
+++ b/xbmc/addons/Skin.cpp
@@ -41,7 +41,7 @@
using namespace std;
using namespace XFILE;
-boost::shared_ptr<ADDON::CSkinInfo> g_SkinInfo;
+std::shared_ptr<ADDON::CSkinInfo> g_SkinInfo;
namespace ADDON
{
diff --git a/xbmc/addons/Skin.h b/xbmc/addons/Skin.h
index dd7771a949..c57e9c4812 100644
--- a/xbmc/addons/Skin.h
+++ b/xbmc/addons/Skin.h
@@ -152,4 +152,4 @@ protected:
} /*namespace ADDON*/
-extern boost::shared_ptr<ADDON::CSkinInfo> g_SkinInfo;
+extern std::shared_ptr<ADDON::CSkinInfo> g_SkinInfo;
diff --git a/xbmc/cdrip/CDDARipJob.cpp b/xbmc/cdrip/CDDARipJob.cpp
index 8f404ee92e..be8ef3d52d 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<IEncoder> enc(new CEncoderFFmpeg());
+ std::shared_ptr<IEncoder> 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<CAudioEncoder> aud = boost::static_pointer_cast<CAudioEncoder>(addon);
+ std::shared_ptr<CAudioEncoder> aud = std::static_pointer_cast<CAudioEncoder>(addon);
aud->Create();
- boost::shared_ptr<IEncoder> enc = boost::static_pointer_cast<IEncoder>(aud);
+ std::shared_ptr<IEncoder> enc = std::static_pointer_cast<IEncoder>(aud);
encoder = new CEncoder(enc);
}
}
diff --git a/xbmc/cdrip/CDDARipper.cpp b/xbmc/cdrip/CDDARipper.cpp
index 4486519a8e..eb8457e963 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<CAudioEncoder> enc = boost::static_pointer_cast<CAudioEncoder>(addon);
+ std::shared_ptr<CAudioEncoder> enc = std::static_pointer_cast<CAudioEncoder>(addon);
track += enc->extension;
}
diff --git a/xbmc/cdrip/Encoder.cpp b/xbmc/cdrip/Encoder.cpp
index c8bf472a6a..a83898b001 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<IEncoder> encoder)
+CEncoder::CEncoder(std::shared_ptr<IEncoder> encoder)
{
m_file = NULL;
m_dwWriteBufferPointer = 0;
diff --git a/xbmc/cdrip/Encoder.h b/xbmc/cdrip/Encoder.h
index 744f80785f..4e5324219b 100644
--- a/xbmc/cdrip/Encoder.h
+++ b/xbmc/cdrip/Encoder.h
@@ -21,11 +21,11 @@
*
*/
-#include <boost/shared_ptr.hpp>
#include "IEncoder.h"
#include <string>
#include <stdint.h>
#include <stdio.h>
+#include <memory>
#define WRITEBUFFER_SIZE 131072 // 128k buffer
@@ -34,7 +34,7 @@ namespace XFILE { class CFile; }
class CEncoder
{
public:
- CEncoder(boost::shared_ptr<IEncoder> encoder);
+ CEncoder(std::shared_ptr<IEncoder> 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 @@ protected:
static int WriteCallback(void *opaque, uint8_t *data, int size);
static int64_t SeekCallback(void *opaque, int64_t offset, int whence);
- boost::shared_ptr<IEncoder> m_impl;
+ std::shared_ptr<IEncoder> m_impl;
XFILE::CFile *m_file;
diff --git a/xbmc/cores/AudioEngine/AESinkFactory.cpp b/xbmc/cores/AudioEngine/AESinkFactory.cpp
index 619b417e5f..a094c2aaf4 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 <algorithm>
+
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 fe7bbbb507..4bf3d04047 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 <string.h>
+#include <cassert>
CAEEncoderFFmpeg::CAEEncoderFFmpeg():
m_BitRate (0 ),
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResamplePi.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResamplePi.cpp
index 96f79b7c8c..fee46e7528 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 <cassert>
#if defined(TARGET_RASPBERRY_PI)
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp
index b391ff3363..dcfca67c3b 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 <new> // for std::bad_alloc
+#include <algorithm>
using namespace ActiveAE;
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
index df50940afc..e52d725348 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
@@ -26,6 +26,7 @@
#include <set>
#include <sstream>
#include <string>
+#include <algorithm>
#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 9725d6ee3d..8b24703689 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp
@@ -20,6 +20,8 @@
#define INITGUID
+#include <algorithm>
+
#include "AESinkDirectSound.h"
#include "utils/log.h"
#include <initguid.h>
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkPi.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkPi.cpp
index 89684e4074..318df3b9a4 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkPi.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkPi.cpp
@@ -24,6 +24,7 @@
#include <stdint.h>
#include <limits.h>
+#include <cassert>
#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 858b008cc4..87f50e84e8 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp
@@ -23,6 +23,7 @@
#include <avrt.h>
#include <initguid.h>
#include <stdint.h>
+#include <algorithm>
#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 afc085ee50..f45555695b 100644
--- a/xbmc/cores/AudioEngine/Utils/AEChannelInfo.cpp
+++ b/xbmc/cores/AudioEngine/Utils/AEChannelInfo.cpp
@@ -19,6 +19,7 @@
*/
#include "AEChannelInfo.h"
+#include <algorithm>
#include <limits>
#include <string.h>
#include <assert.h>
diff --git a/xbmc/cores/AudioEngine/Utils/AEStreamInfo.cpp b/xbmc/cores/AudioEngine/Utils/AEStreamInfo.cpp
index 73b84f3208..cc68651f05 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 <algorithm>
#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 f535512451..dd616b9665 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 <cassert>
+
extern "C" {
#include "libavutil/channel_layout.h"
}
diff --git a/xbmc/cores/DllLoader/DllLoader.cpp b/xbmc/cores/DllLoader/DllLoader.cpp
index 1798c2d174..01f8e9ad7b 100644
--- a/xbmc/cores/DllLoader/DllLoader.cpp
+++ b/xbmc/cores/DllLoader/DllLoader.cpp
@@ -18,6 +18,9 @@
*
*/
+#include <stdlib.h>
+#include <algorithm>
+
#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 2f38ed0471..a5a6d33ada 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 <memory>
+
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<type> var##_holder(var, CoTaskMemFree);
+#define SCOPE(type, var) std::shared_ptr<type> 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 79b4e6ed73..4ba6ed9894 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 <algorithm>
+
#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 684460d61c..e9be084d97 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlay.h
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlay.h
@@ -92,7 +92,7 @@ public:
}
/**
- * 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 40a36f6bb2..015d4bf4b3 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp
@@ -50,6 +50,8 @@
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
+#include <cassert>
+
static bool CanSurfaceRenderBlackList(const std::string &name)
{
// All devices 'should' be capiable of surface rendering
@@ -123,7 +125,7 @@ protected:
class CDVDMediaCodecOnFrameAvailable : public CEvent, CJNISurfaceTextureOnFrameAvailableListener
{
public:
- CDVDMediaCodecOnFrameAvailable(boost::shared_ptr<CJNISurfaceTexture> &surfaceTexture)
+ CDVDMediaCodecOnFrameAvailable(std::shared_ptr<CJNISurfaceTexture> &surfaceTexture)
: m_surfaceTexture(surfaceTexture)
{
m_surfaceTexture->setOnFrameAvailableListener(*this);
@@ -143,7 +145,7 @@ protected:
}
private:
- boost::shared_ptr<CJNISurfaceTexture> m_surfaceTexture;
+ std::shared_ptr<CJNISurfaceTexture> m_surfaceTexture;
};
@@ -152,9 +154,9 @@ private:
CDVDMediaCodecInfo::CDVDMediaCodecInfo(
int index
, unsigned int texture
- , boost::shared_ptr<CJNIMediaCodec> &codec
- , boost::shared_ptr<CJNISurfaceTexture> &surfacetexture
- , boost::shared_ptr<CDVDMediaCodecOnFrameAvailable> &frameready
+ , std::shared_ptr<CJNIMediaCodec> &codec
+ , std::shared_ptr<CJNISurfaceTexture> &surfacetexture
+ , std::shared_ptr<CDVDMediaCodecOnFrameAvailable> &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<CJNIMediaCodec>(new CJNIMediaCodec(CJNIMediaCodec::createByCodecName(m_codecname)));
+ m_codec = std::shared_ptr<CJNIMediaCodec>(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<CJNISurfaceTexture>(new CJNISurfaceTexture(m_textureId));
+ m_surfaceTexture = std::shared_ptr<CJNISurfaceTexture>(new CJNISurfaceTexture(m_textureId));
// hook the surfaceTexture OnFrameAvailable callback
- m_frameAvailable = boost::shared_ptr<CDVDMediaCodecOnFrameAvailable>(new CDVDMediaCodecOnFrameAvailable(m_surfaceTexture));
+ m_frameAvailable = std::shared_ptr<CDVDMediaCodecOnFrameAvailable>(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 d93dd0a47d..b29471b8e2 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.h
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.h
@@ -22,7 +22,7 @@
#include <queue>
#include <vector>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include "DVDVideoCodec.h"
#include "DVDStreamInfo.h"
@@ -49,9 +49,9 @@ class CDVDMediaCodecInfo
public:
CDVDMediaCodecInfo( int index,
unsigned int texture,
- boost::shared_ptr<CJNIMediaCodec> &codec,
- boost::shared_ptr<CJNISurfaceTexture> &surfacetexture,
- boost::shared_ptr<CDVDMediaCodecOnFrameAvailable> &frameready);
+ std::shared_ptr<CJNIMediaCodec> &codec,
+ std::shared_ptr<CJNISurfaceTexture> &surfacetexture,
+ std::shared_ptr<CDVDMediaCodecOnFrameAvailable> &frameready);
// reference counting
CDVDMediaCodecInfo* Retain();
@@ -80,9 +80,9 @@ private:
CCriticalSection m_section;
// shared_ptr bits, shared between
// CDVDVideoCodecAndroidMediaCodec and LinuxRenderGLES.
- boost::shared_ptr<CJNIMediaCodec> m_codec;
- boost::shared_ptr<CJNISurfaceTexture> m_surfacetexture;
- boost::shared_ptr<CDVDMediaCodecOnFrameAvailable> m_frameready;
+ std::shared_ptr<CJNIMediaCodec> m_codec;
+ std::shared_ptr<CJNISurfaceTexture> m_surfacetexture;
+ std::shared_ptr<CDVDMediaCodecOnFrameAvailable> m_frameready;
};
class CDVDVideoCodecAndroidMediaCodec : public CDVDVideoCodec
@@ -128,9 +128,9 @@ protected:
// 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<CJNIMediaCodec> m_codec;
- boost::shared_ptr<CJNISurfaceTexture> m_surfaceTexture;
- boost::shared_ptr<CDVDMediaCodecOnFrameAvailable> m_frameAvailable;
+ std::shared_ptr<CJNIMediaCodec> m_codec;
+ std::shared_ptr<CJNISurfaceTexture> m_surfaceTexture;
+ std::shared_ptr<CDVDMediaCodecOnFrameAvailable> m_frameAvailable;
std::queue<amc_demux> m_demux;
std::vector<CJNIByteBuffer> m_input;
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
index 5ec0e9ba76..9f8e3c9a68 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 <memory>
#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 ca0abcc000..eaab2b8fae 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 <cassert>
+
#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 e3dc9dcae7..fc83287af9 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 <memory>
#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 b1b7c90ab4..4c04427dfd 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/MMALCodec.h
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/MMALCodec.h
@@ -35,14 +35,14 @@
#include <queue>
#include <semaphore.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <string>
#include "guilib/Geometry.h"
#include "rendering/RenderSystem.h"
#include "cores/VideoRenderers/BaseRenderer.h"
class CMMALVideo;
-typedef boost::shared_ptr<CMMALVideo> MMALVideoPtr;
+typedef std::shared_ptr<CMMALVideo> 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 f737edc43e..b2c12cf6d1 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 <list>
#include <map>
+#include <memory>
#include <va/va.h>
#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 ebd19ce45d..02a6dc42d9 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/libstagefrightICS/StageFrightVideoPrivate.h
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/libstagefrightICS/StageFrightVideoPrivate.h
@@ -33,6 +33,10 @@
#include <media/stagefright/MediaDefs.h>
#include <media/stagefright/MediaSource.h>
+#if __cplusplus >= 201103L
+#define char16_t LIBRARY_char16_t
+#define char32_t LIBRARY_char32_t
+#endif
#include <binder/ProcessState.h>
#include <media/stagefright/OMXClient.h>
#include <media/stagefright/OMXCodec.h>
@@ -42,6 +46,10 @@
#include <ui/GraphicBuffer.h>
#include <ui/PixelFormat.h>
#include <gui/SurfaceTexture.h>
+#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 47dd89e9e8..24d56da6fd 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 <algorithm>
+
class CBitstream
{
public:
diff --git a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.h b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.h
index 0dab33dbf1..2fc3c6309c 100644
--- a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.h
+++ b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.h
@@ -108,7 +108,7 @@ protected:
#define MAX_STREAMS 100
#endif
CDemuxStream* m_streams[MAX_STREAMS]; // maximum number of streams that ffmpeg can handle
- boost::shared_ptr<PVR::CPVRClient> m_pvrClient;
+ std::shared_ptr<PVR::CPVRClient> m_pvrClient;
private:
void RequestStreams();
diff --git a/xbmc/cores/dvdplayer/DVDDemuxers/DVDFactoryDemuxer.cpp b/xbmc/cores/dvdplayer/DVDDemuxers/DVDFactoryDemuxer.cpp
index 343651c6fd..e70d1b0de7 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<CPVRClient> client;
+ std::shared_ptr<CPVRClient> client;
if (g_PVRClients->GetPlayingClient(client) &&
client->HandlesDemuxing())
{
diff --git a/xbmc/cores/dvdplayer/DVDFileInfo.cpp b/xbmc/cores/dvdplayer/DVDFileInfo.cpp
index ef297bc2e0..7474333219 100644
--- a/xbmc/cores/dvdplayer/DVDFileInfo.cpp
+++ b/xbmc/cores/dvdplayer/DVDFileInfo.cpp
@@ -18,6 +18,8 @@
*
*/
+#include <cstdlib>
+
#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 17006b6b7b..72af2ddeaf 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<PVR::CPVRChannel> CPVRChannelPtr;
+ typedef std::shared_ptr<PVR::CPVRChannel> CPVRChannelPtr;
}
class CDVDInputStream
diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp
index 6056e51c8b..2ef5f95d7f 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 <functional>
+
#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 7c75d646cc..1f5f926652 100644
--- a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.h
+++ b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.h
@@ -22,7 +22,7 @@
#include "DVDInputStream.h"
#include <list>
-#include <boost/shared_ptr.hpp>
+#include <memory>
extern "C"
{
@@ -133,7 +133,7 @@ protected:
bool m_menu;
bool m_navmode;
- typedef boost::shared_ptr<CDVDOverlayImage> SOverlay;
+ typedef std::shared_ptr<CDVDOverlayImage> SOverlay;
typedef std::list<SOverlay> SOverlays;
struct SPlane
diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamStack.cpp b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamStack.cpp
index cfd5339ad5..fbe24b8136 100644
--- a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamStack.cpp
+++ b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamStack.cpp
@@ -27,7 +27,6 @@
#include <limits.h>
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 d837710392..de35a82606 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 <memory>
class CDVDInputStreamStack : public CDVDInputStream
{
@@ -39,7 +39,7 @@ public:
protected:
- typedef boost::shared_ptr<XFILE::CFile> TFile;
+ typedef std::shared_ptr<XFILE::CFile> TFile;
struct TSeg
{
diff --git a/xbmc/cores/dvdplayer/DVDMessage.cpp b/xbmc/cores/dvdplayer/DVDMessage.cpp
index 40411c4609..1e0867bbcc 100644
--- a/xbmc/cores/dvdplayer/DVDMessage.cpp
+++ b/xbmc/cores/dvdplayer/DVDMessage.cpp
@@ -18,6 +18,7 @@
*
*/
+#include <algorithm>
#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 325b15f72f..6c6ba5034e 100644
--- a/xbmc/cores/dvdplayer/DVDMessageQueue.h
+++ b/xbmc/cores/dvdplayer/DVDMessageQueue.h
@@ -23,6 +23,7 @@
#include "DVDMessage.h"
#include <string>
#include <list>
+#include <algorithm>
#include "threads/CriticalSection.h"
#include "threads/Event.h"
diff --git a/xbmc/cores/paplayer/NSFCodec.cpp b/xbmc/cores/paplayer/NSFCodec.cpp
index 9ced1f1b88..1438368c18 100644
--- a/xbmc/cores/paplayer/NSFCodec.cpp
+++ b/xbmc/cores/paplayer/NSFCodec.cpp
@@ -17,6 +17,7 @@
* <http://www.gnu.org/licenses/>.
*
*/
+#include <cstdlib>
#include "NSFCodec.h"
#include "utils/log.h"
diff --git a/xbmc/dbwrappers/DatabaseQuery.cpp b/xbmc/dbwrappers/DatabaseQuery.cpp
index 5e6fd443ab..e443d3dad9 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<CDatabaseQueryRuleCombination> combo(factory->CreateCombination());
+ std::shared_ptr<CDatabaseQueryRuleCombination> combo(factory->CreateCombination());
if (combo && combo->Load(*it, factory))
m_combinations.push_back(combo);
}
else
{
- boost::shared_ptr<CDatabaseQueryRule> rule(factory->CreateRule());
+ std::shared_ptr<CDatabaseQueryRule> 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 d3eec3274e..f17c22fea2 100644
--- a/xbmc/dbwrappers/DatabaseQuery.h
+++ b/xbmc/dbwrappers/DatabaseQuery.h
@@ -22,7 +22,7 @@
#include <set>
#include <string>
#include <vector>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#define DATABASEQUERY_RULE_VALUE_SEPARATOR " / "
@@ -101,8 +101,8 @@ protected:
class CDatabaseQueryRuleCombination;
-typedef std::vector< boost::shared_ptr<CDatabaseQueryRule> > CDatabaseQueryRules;
-typedef std::vector< boost::shared_ptr<CDatabaseQueryRuleCombination> > CDatabaseQueryRuleCombinations;
+typedef std::vector< std::shared_ptr<CDatabaseQueryRule> > CDatabaseQueryRules;
+typedef std::vector< std::shared_ptr<CDatabaseQueryRuleCombination> > CDatabaseQueryRuleCombinations;
class IDatabaseQueryRuleFactory
{
diff --git a/xbmc/dbwrappers/mysqldataset.cpp b/xbmc/dbwrappers/mysqldataset.cpp
index d8df89fb03..4b0a387083 100644
--- a/xbmc/dbwrappers/mysqldataset.cpp
+++ b/xbmc/dbwrappers/mysqldataset.cpp
@@ -21,6 +21,7 @@
#include <iostream>
#include <string>
#include <set>
+#include <algorithm>
#include "utils/log.h"
#include "system.h" // for GetLastError()
diff --git a/xbmc/dialogs/GUIDialogBusy.cpp b/xbmc/dialogs/GUIDialogBusy.cpp
index e7cfcddc02..a0f6726ab7 100644
--- a/xbmc/dialogs/GUIDialogBusy.cpp
+++ b/xbmc/dialogs/GUIDialogBusy.cpp
@@ -27,13 +27,13 @@
class CBusyWaiter : public CThread
{
- boost::shared_ptr<CEvent> m_done;
+ std::shared_ptr<CEvent> m_done;
public:
CBusyWaiter(IRunnable *runnable) : CThread(runnable, "waiting"), m_done(new CEvent()) { }
bool Wait()
{
- boost::shared_ptr<CEvent> e_done(m_done);
+ std::shared_ptr<CEvent> e_done(m_done);
Create();
return CGUIDialogBusy::WaitOnEvent(*e_done);
@@ -42,7 +42,7 @@ public:
// 'this' is actually deleted from the thread where it's on the stack
virtual void Process()
{
- boost::shared_ptr<CEvent> e_done(m_done);
+ std::shared_ptr<CEvent> e_done(m_done);
CThread::Process();
(*e_done).Set();
diff --git a/xbmc/dialogs/GUIDialogSmartPlaylistEditor.cpp b/xbmc/dialogs/GUIDialogSmartPlaylistEditor.cpp
index ada5f6f88b..dc5e86c6fb 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<CSmartPlaylistRule>(m_playlist.m_ruleCombination.m_rules[item]);
+ CSmartPlaylistRule rule = *std::static_pointer_cast<CSmartPlaylistRule>(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<CSmartPlaylistRule>(m_playlist.m_ruleCombination.m_rules[i])->GetLocalizedRule());
+ item->SetLabel(std::static_pointer_cast<CSmartPlaylistRule>(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 8e21e5033b..3a8a186cd1 100644
--- a/xbmc/epg/EpgDatabase.cpp
+++ b/xbmc/epg/EpgDatabase.cpp
@@ -17,6 +17,7 @@
* <http://www.gnu.org/licenses/>.
*
*/
+#include <cstdlib>
#include "dbwrappers/dataset.h"
#include "settings/AdvancedSettings.h"
diff --git a/xbmc/epg/EpgInfoTag.h b/xbmc/epg/EpgInfoTag.h
index de0162fb05..2fc6afb171 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 <boost/shared_ptr.hpp>
+#include <memory>
#include <string>
#define EPG_DEBUGGING 0
@@ -38,7 +38,7 @@ namespace EPG
class CEpg;
class CEpgInfoTag;
- typedef boost::shared_ptr<EPG::CEpgInfoTag> CEpgInfoTagPtr;
+ typedef std::shared_ptr<EPG::CEpgInfoTag> CEpgInfoTagPtr;
class CEpgInfoTag : public ISerializable
{
diff --git a/xbmc/epg/GUIEPGGridContainer.cpp b/xbmc/epg/GUIEPGGridContainer.cpp
index 2c3d624b20..3cb997512a 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<CFileItem>(m_channelItems[iIndex]);
+ CFileItemPtr fileItem = std::static_pointer_cast<CFileItem>(m_channelItems[iIndex]);
if (fileItem->HasPVRChannelInfoTag())
return fileItem->GetPVRChannelInfoTag();
}
diff --git a/xbmc/filesystem/AddonsDirectory.cpp b/xbmc/filesystem/AddonsDirectory.cpp
index b9d4846280..1f044d300c 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.size(); i++)
{
- PluginPtr plugin = boost::dynamic_pointer_cast<CPluginSource>(tempAddons[i]);
+ PluginPtr plugin = std::dynamic_pointer_cast<CPluginSource>(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.size(); i++)
{
- PluginPtr plugin = boost::dynamic_pointer_cast<CPluginSource>(tempAddons[i]);
+ PluginPtr plugin = std::dynamic_pointer_cast<CPluginSource>(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<CPluginSource>(addons[i]);
+ PluginPtr plugin = std::dynamic_pointer_cast<CPluginSource>(addons[i]);
if (plugin->ProvidesSeveral())
{
CURL url = item->GetURL();
diff --git a/xbmc/filesystem/AddonsDirectory.h b/xbmc/filesystem/AddonsDirectory.h
index d4a23e8b84..5021aeca15 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<CFileItem> CFileItemPtr;
+typedef std::shared_ptr<CFileItem> CFileItemPtr;
namespace XFILE
{
diff --git a/xbmc/filesystem/BlurayDirectory.cpp b/xbmc/filesystem/BlurayDirectory.cpp
index 349469dbad..619ab4c339 100644
--- a/xbmc/filesystem/BlurayDirectory.cpp
+++ b/xbmc/filesystem/BlurayDirectory.cpp
@@ -29,6 +29,8 @@
#include "video/VideoInfoTag.h"
#include "guilib/LocalizeStrings.h"
+#include <cassert>
+
namespace XFILE
{
diff --git a/xbmc/filesystem/CDDAFile.cpp b/xbmc/filesystem/CDDAFile.cpp
index b3405c49eb..16796f555c 100644
--- a/xbmc/filesystem/CDDAFile.cpp
+++ b/xbmc/filesystem/CDDAFile.cpp
@@ -30,6 +30,8 @@
#include "utils/log.h"
#include "utils/URIUtils.h"
+#include <algorithm>
+
using namespace MEDIA_DETECT;
using namespace XFILE;
diff --git a/xbmc/filesystem/CDDAFile.h b/xbmc/filesystem/CDDAFile.h
index 801b02618c..0427af4534 100644
--- a/xbmc/filesystem/CDDAFile.h
+++ b/xbmc/filesystem/CDDAFile.h
@@ -54,7 +54,7 @@ protected:
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<MEDIA_DETECT::CLibcdio> m_cdio;
+ std::shared_ptr<MEDIA_DETECT::CLibcdio> m_cdio;
};
}
diff --git a/xbmc/filesystem/CacheStrategy.cpp b/xbmc/filesystem/CacheStrategy.cpp
index f7b4f0a0e5..d9c8d53219 100644
--- a/xbmc/filesystem/CacheStrategy.cpp
+++ b/xbmc/filesystem/CacheStrategy.cpp
@@ -36,6 +36,9 @@
#define CacheLocalFile CWin32File
#endif // TARGET_WINDOWS
+#include <cassert>
+#include <algorithm>
+
using namespace XFILE;
CCacheStrategy::CCacheStrategy() : m_bEndOfInput(false)
diff --git a/xbmc/filesystem/CircularCache.cpp b/xbmc/filesystem/CircularCache.cpp
index eb8c044959..fc4e99a211 100644
--- a/xbmc/filesystem/CircularCache.cpp
+++ b/xbmc/filesystem/CircularCache.cpp
@@ -18,6 +18,7 @@
*
*/
+#include <algorithm>
#include "threads/SystemClock.h"
#include "system.h"
#include "utils/log.h"
diff --git a/xbmc/filesystem/CurlFile.cpp b/xbmc/filesystem/CurlFile.cpp
index 7d68daba12..25aceea6f4 100644
--- a/xbmc/filesystem/CurlFile.cpp
+++ b/xbmc/filesystem/CurlFile.cpp
@@ -29,6 +29,7 @@
#include <vector>
#include <climits>
+#include <cassert>
#ifdef TARGET_POSIX
#include <errno.h>
diff --git a/xbmc/filesystem/Directory.cpp b/xbmc/filesystem/Directory.cpp
index d1413d43e3..bb61e4dfd9 100644
--- a/xbmc/filesystem/Directory.cpp
+++ b/xbmc/filesystem/Directory.cpp
@@ -57,8 +57,8 @@ private:
struct CGetJob
: CJob
{
- CGetJob(boost::shared_ptr<IDirectory>& imp
- , boost::shared_ptr<CResult>& result)
+ CGetJob(std::shared_ptr<IDirectory>& imp
+ , std::shared_ptr<CResult>& result)
: m_result(result)
, m_imp(imp)
{}
@@ -71,13 +71,13 @@ private:
return m_result->m_result;
}
- boost::shared_ptr<CResult> m_result;
- boost::shared_ptr<IDirectory> m_imp;
+ std::shared_ptr<CResult> m_result;
+ std::shared_ptr<IDirectory> m_imp;
};
public:
- CGetDirectory(boost::shared_ptr<IDirectory>& imp, const CURL& dir, const CURL& listDir)
+ CGetDirectory(std::shared_ptr<IDirectory>& 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 @@ public:
list.Copy(m_result->m_list);
return true;
}
- boost::shared_ptr<CResult> m_result;
+ std::shared_ptr<CResult> 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<IDirectory> pDirectory(CDirectoryFactory::Create(realURL));
+ std::shared_ptr<IDirectory> pDirectory(CDirectoryFactory::Create(realURL));
if (!pDirectory.get())
return false;
diff --git a/xbmc/filesystem/DirectoryCache.cpp b/xbmc/filesystem/DirectoryCache.cpp
index 76ea5540fd..987760a5f4 100644
--- a/xbmc/filesystem/DirectoryCache.cpp
+++ b/xbmc/filesystem/DirectoryCache.cpp
@@ -26,6 +26,8 @@
#include "utils/StringUtils.h"
#include "climits"
+#include <algorithm>
+
using namespace std;
using namespace XFILE;
diff --git a/xbmc/filesystem/DirectoryHistory.cpp b/xbmc/filesystem/DirectoryHistory.cpp
index 319e20bc09..fb04148de3 100644
--- a/xbmc/filesystem/DirectoryHistory.cpp
+++ b/xbmc/filesystem/DirectoryHistory.cpp
@@ -23,6 +23,8 @@
#include "utils/StringUtils.h"
#include "utils/URIUtils.h"
+#include <algorithm>
+
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 3880c58d99..2152fefced 100644
--- a/xbmc/filesystem/FileCache.cpp
+++ b/xbmc/filesystem/FileCache.cpp
@@ -31,6 +31,9 @@
#include "utils/TimeUtils.h"
#include "settings/AdvancedSettings.h"
+#include <cassert>
+#include <algorithm>
+
using namespace AUTOPTR;
using namespace XFILE;
diff --git a/xbmc/filesystem/HTSPDirectory.cpp b/xbmc/filesystem/HTSPDirectory.cpp
index 95b58aec56..e15abd5f16 100644
--- a/xbmc/filesystem/HTSPDirectory.cpp
+++ b/xbmc/filesystem/HTSPDirectory.cpp
@@ -30,6 +30,8 @@
#include "utils/TimeUtils.h"
#include "utils/StringUtils.h"
+#include <cassert>
+
extern "C" {
#include "libhts/htsmsg.h"
#include "libhts/htsmsg_binary.h"
diff --git a/xbmc/filesystem/HTSPDirectory.h b/xbmc/filesystem/HTSPDirectory.h
index daf15a3b09..953883a9e2 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 <memory>
class CURL;
-class CFileItem; typedef boost::shared_ptr<CFileItem> CFileItemPtr;
+class CFileItem; typedef std::shared_ptr<CFileItem> CFileItemPtr;
namespace HTSP
{
diff --git a/xbmc/filesystem/SFTPFile.h b/xbmc/filesystem/SFTPFile.h
index 4a057d173e..973b2df226 100644
--- a/xbmc/filesystem/SFTPFile.h
+++ b/xbmc/filesystem/SFTPFile.h
@@ -35,7 +35,7 @@
#endif // !TARGET_WINDOWS
#include <string>
#include <map>
-#include <boost/shared_ptr.hpp>
+#include <memory>
class CURL;
@@ -83,7 +83,7 @@ private:
int m_LastActive;
};
-typedef boost::shared_ptr<CSFTPSession> CSFTPSessionPtr;
+typedef std::shared_ptr<CSFTPSession> CSFTPSessionPtr;
class CSFTPSessionManager
{
diff --git a/xbmc/filesystem/SMBFile.cpp b/xbmc/filesystem/SMBFile.cpp
index 603f99d2a5..1c18a8140c 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 6ce42a0ba9..3e1ba022e9 100644
--- a/xbmc/filesystem/SpecialProtocol.cpp
+++ b/xbmc/filesystem/SpecialProtocol.cpp
@@ -29,6 +29,7 @@
#include "utils/URIUtils.h"
#include "utils/StringUtils.h"
+#include <cassert>
#ifdef TARGET_POSIX
#include <dirent.h>
#endif
diff --git a/xbmc/filesystem/ZeroconfDirectory.cpp b/xbmc/filesystem/ZeroconfDirectory.cpp
index c4789219d7..20f15de5c3 100644
--- a/xbmc/filesystem/ZeroconfDirectory.cpp
+++ b/xbmc/filesystem/ZeroconfDirectory.cpp
@@ -20,6 +20,7 @@
#include "ZeroconfDirectory.h"
#include <stdexcept>
+#include <cassert>
#include "URL.h"
#include "utils/URIUtils.h"
diff --git a/xbmc/filesystem/iso9660.cpp b/xbmc/filesystem/iso9660.cpp
index e3c9521f18..d2e960b6f7 100644
--- a/xbmc/filesystem/iso9660.cpp
+++ b/xbmc/filesystem/iso9660.cpp
@@ -19,6 +19,7 @@
*
*/
+#include <algorithm>
#include "system.h"
#include "utils/log.h"
diff --git a/xbmc/filesystem/win32/Win32Directory.cpp b/xbmc/filesystem/win32/Win32Directory.cpp
index eb4c5aa395..377c5081cd 100644
--- a/xbmc/filesystem/win32/Win32Directory.cpp
+++ b/xbmc/filesystem/win32/Win32Directory.cpp
@@ -32,6 +32,8 @@
#endif // WIN32_LEAN_AND_MEAN
#include <Windows.h>
+#include <cassert>
+
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 0c8b661bc8..11be7cdb6b 100644
--- a/xbmc/filesystem/win32/Win32File.cpp
+++ b/xbmc/filesystem/win32/Win32File.cpp
@@ -37,6 +37,7 @@
#include <intsafe.h>
#include <wchar.h>
#include <limits.h>
+#include <cassert>
using namespace XFILE;
diff --git a/xbmc/filesystem/win32/Win32SMBDirectory.cpp b/xbmc/filesystem/win32/Win32SMBDirectory.cpp
index e2000ef181..ed8cecdc1f 100644
--- a/xbmc/filesystem/win32/Win32SMBDirectory.cpp
+++ b/xbmc/filesystem/win32/Win32SMBDirectory.cpp
@@ -41,6 +41,8 @@
#include <lm.h>
#pragma comment(lib, "Netapi32.lib")
+#include <cassert>
+
using namespace XFILE;
// local helper
diff --git a/xbmc/filesystem/win32/Win32SMBFile.cpp b/xbmc/filesystem/win32/Win32SMBFile.cpp
index b8f95d1b43..2282ce18e3 100644
--- a/xbmc/filesystem/win32/Win32SMBFile.cpp
+++ b/xbmc/filesystem/win32/Win32SMBFile.cpp
@@ -29,6 +29,7 @@
#endif // WIN32_LEAN_AND_MEAN
#include <Windows.h>
+#include <cassert>
using namespace XFILE;
diff --git a/xbmc/guilib/DDSImage.cpp b/xbmc/guilib/DDSImage.cpp
index e9800a0e47..c5c3106eef 100644
--- a/xbmc/guilib/DDSImage.cpp
+++ b/xbmc/guilib/DDSImage.cpp
@@ -18,6 +18,7 @@
*
*/
+#include <algorithm>
#include "DDSImage.h"
#include "XBTF.h"
#include <squish.h>
diff --git a/xbmc/guilib/GUIBaseContainer.cpp b/xbmc/guilib/GUIBaseContainer.cpp
index 8413d5c03e..651be06097 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<CFileItem>(m_items[0]))->IsParentFolder())
+ if (m_items.size() && m_items[0]->IsFileItem() && (std::static_pointer_cast<CFileItem>(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<CFileItem>(m_items[0]))->IsParentFolder())
+ if (numItems && m_items[0]->IsFileItem() && (std::static_pointer_cast<CFileItem>(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 5c8dd9fda8..69e9552df0 100644
--- a/xbmc/guilib/GUIControlGroup.cpp
+++ b/xbmc/guilib/GUIControlGroup.cpp
@@ -21,6 +21,8 @@
#include "GUIControlGroup.h"
#include "GUIControlProfiler.h"
+#include <cassert>
+
using namespace std;
CGUIControlGroup::CGUIControlGroup()
diff --git a/xbmc/guilib/GUIFontCache.h b/xbmc/guilib/GUIFontCache.h
index 575ee7d272..c3952cf103 100644
--- a/xbmc/guilib/GUIFontCache.h
+++ b/xbmc/guilib/GUIFontCache.h
@@ -33,12 +33,12 @@
#include <algorithm>
#include <vector>
+#include <memory>
#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<std::vector<SVertex> >
+struct CGUIFontCacheStaticValue : public std::shared_ptr<std::vector<SVertex> >
{
void clear()
{
diff --git a/xbmc/guilib/GUIFontTTF.cpp b/xbmc/guilib/GUIFontTTF.cpp
index a16d3db162..e30367de6d 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 <math.h>
+#include <memory>
// stuff for freetype
#include <ft2build.h>
@@ -375,10 +375,10 @@ void CGUIFontTTFBase::DrawTextInternal(float x, float y, const vecColors &colors
XbmcThreads::SystemClockMillis(),
dirtyCache) :
unusedVertexBuffer;
- boost::shared_ptr<std::vector<SVertex> > tempVertices = boost::make_shared<std::vector<SVertex> >();
- boost::shared_ptr<std::vector<SVertex> > &vertices = hardwareClipping ?
+ std::shared_ptr<std::vector<SVertex> > tempVertices = std::make_shared<std::vector<SVertex> >();
+ std::shared_ptr<std::vector<SVertex> > &vertices = hardwareClipping ?
tempVertices :
- static_cast<boost::shared_ptr<std::vector<SVertex> >&>(m_staticCache.Lookup(staticPos,
+ static_cast<std::shared_ptr<std::vector<SVertex> >&>(m_staticCache.Lookup(staticPos,
colors, text,
alignment, maxPixelWidth,
scrolling,
diff --git a/xbmc/guilib/GUIImage.cpp b/xbmc/guilib/GUIImage.cpp
index 8438135f7f..f57a86337d 100644
--- a/xbmc/guilib/GUIImage.cpp
+++ b/xbmc/guilib/GUIImage.cpp
@@ -23,6 +23,8 @@
#include "utils/log.h"
#include "utils/TimeUtils.h"
+#include <cassert>
+
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 2198da6f5c..6dbbb02e88 100644
--- a/xbmc/guilib/GUIMessage.h
+++ b/xbmc/guilib/GUIMessage.h
@@ -327,10 +327,10 @@ do { \
#include <string>
#include <vector>
-#include <boost/shared_ptr.hpp>
+#include <memory>
// forwards
-class CGUIListItem; typedef boost::shared_ptr<CGUIListItem> CGUIListItemPtr;
+class CGUIListItem; typedef std::shared_ptr<CGUIListItem> CGUIListItemPtr;
class CFileItemList;
/*!
diff --git a/xbmc/guilib/GUIPanelContainer.cpp b/xbmc/guilib/GUIPanelContainer.cpp
index 3de3997b23..042c8d492b 100644
--- a/xbmc/guilib/GUIPanelContainer.cpp
+++ b/xbmc/guilib/GUIPanelContainer.cpp
@@ -23,6 +23,8 @@
#include "GUIInfoManager.h"
#include "Key.h"
+#include <cassert>
+
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 207bdb7144..57cf5f9194 100644
--- a/xbmc/guilib/GUIStaticItem.h
+++ b/xbmc/guilib/GUIStaticItem.h
@@ -94,4 +94,4 @@ private:
CGUIAction m_clickActions;
};
-typedef boost::shared_ptr<CGUIStaticItem> CGUIStaticItemPtr;
+typedef std::shared_ptr<CGUIStaticItem> CGUIStaticItemPtr;
diff --git a/xbmc/guilib/GUITextureGLES.cpp b/xbmc/guilib/GUITextureGLES.cpp
index 7bc8a1d175..03ac9dc004 100644
--- a/xbmc/guilib/GUITextureGLES.cpp
+++ b/xbmc/guilib/GUITextureGLES.cpp
@@ -29,6 +29,8 @@
#include "windowing/WindowingFactory.h"
#include "guilib/GraphicContext.h"
+#include <cstddef>
+
#if defined(HAS_GLES)
diff --git a/xbmc/guilib/GUIVisualisationControl.cpp b/xbmc/guilib/GUIVisualisationControl.cpp
index c09284d96e..bcac34456a 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<CVisualisation>(addon);
+ m_addon = std::dynamic_pointer_cast<CVisualisation>(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 2f4137e747..f3b96b3a2e 100644
--- a/xbmc/guilib/GUIWindow.h
+++ b/xbmc/guilib/GUIWindow.h
@@ -29,10 +29,10 @@
*/
#include "GUIControlGroup.h"
-#include "boost/shared_ptr.hpp"
+#include <memory>
#include "threads/CriticalSection.h"
-class CFileItem; typedef boost::shared_ptr<CFileItem> CFileItemPtr;
+class CFileItem; typedef std::shared_ptr<CFileItem> CFileItemPtr;
#include "GUICallback.h" // for GUIEvent
diff --git a/xbmc/guilib/IGUIContainer.h b/xbmc/guilib/IGUIContainer.h
index 9e36ffa9bf..61a0bd6099 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 <memory>
-typedef boost::shared_ptr<CGUIListItem> CGUIListItemPtr;
+typedef std::shared_ptr<CGUIListItem> CGUIListItemPtr;
/*!
\ingroup controls
diff --git a/xbmc/guilib/VisibleEffect.cpp b/xbmc/guilib/VisibleEffect.cpp
index a8fb55773a..89b98387a8 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<Tweener>(new LinearTweener());
+ m_pTweener = std::shared_ptr<Tweener>(new LinearTweener());
}
CAnimEffect::~CAnimEffect()
@@ -96,28 +96,28 @@ void CAnimEffect::ApplyState(ANIMATION_STATE state, const CPoint &center)
ApplyEffect(offset, center);
}
-boost::shared_ptr<Tweener> CAnimEffect::GetTweener(const TiXmlElement *pAnimationNode)
+std::shared_ptr<Tweener> CAnimEffect::GetTweener(const TiXmlElement *pAnimationNode)
{
- boost::shared_ptr<Tweener> m_pTweener;
+ std::shared_ptr<Tweener> m_pTweener;
const char *tween = pAnimationNode->Attribute("tween");
if (tween)
{
if (strcmpi(tween, "linear")==0)
- m_pTweener = boost::shared_ptr<Tweener>(new LinearTweener());
+ m_pTweener = std::shared_ptr<Tweener>(new LinearTweener());
else if (strcmpi(tween, "quadratic")==0)
- m_pTweener = boost::shared_ptr<Tweener>(new QuadTweener());
+ m_pTweener = std::shared_ptr<Tweener>(new QuadTweener());
else if (strcmpi(tween, "cubic")==0)
- m_pTweener = boost::shared_ptr<Tweener>(new CubicTweener());
+ m_pTweener = std::shared_ptr<Tweener>(new CubicTweener());
else if (strcmpi(tween, "sine")==0)
- m_pTweener = boost::shared_ptr<Tweener>(new SineTweener());
+ m_pTweener = std::shared_ptr<Tweener>(new SineTweener());
else if (strcmpi(tween, "back")==0)
- m_pTweener = boost::shared_ptr<Tweener>(new BackTweener());
+ m_pTweener = std::shared_ptr<Tweener>(new BackTweener());
else if (strcmpi(tween, "circle")==0)
- m_pTweener = boost::shared_ptr<Tweener>(new CircleTweener());
+ m_pTweener = std::shared_ptr<Tweener>(new CircleTweener());
else if (strcmpi(tween, "bounce")==0)
- m_pTweener = boost::shared_ptr<Tweener>(new BounceTweener());
+ m_pTweener = std::shared_ptr<Tweener>(new BounceTweener());
else if (strcmpi(tween, "elastic")==0)
- m_pTweener = boost::shared_ptr<Tweener>(new ElasticTweener());
+ m_pTweener = std::shared_ptr<Tweener>(new ElasticTweener());
const char *easing = pAnimationNode->Attribute("easing");
if (m_pTweener && easing)
@@ -139,11 +139,11 @@ boost::shared_ptr<Tweener> CAnimEffect::GetTweener(const TiXmlElement *pAnimatio
// or quadratic if we have acceleration
if (accel)
{
- m_pTweener = boost::shared_ptr<Tweener>(new QuadTweener(accel));
+ m_pTweener = std::shared_ptr<Tweener>(new QuadTweener(accel));
m_pTweener->SetEasing(EASE_IN);
}
else
- m_pTweener = boost::shared_ptr<Tweener>(new LinearTweener());
+ m_pTweener = std::shared_ptr<Tweener>(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> tweener /* = NULL */)
+CScroller::CScroller(unsigned int duration /* = 200 */, std::shared_ptr<Tweener> tweener /* = NULL */)
{
m_scrollValue = 0;
m_delta = 0;
diff --git a/xbmc/guilib/VisibleEffect.h b/xbmc/guilib/VisibleEffect.h
index 22e781228d..0041160cfd 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 <memory>
#include "interfaces/info/InfoBool.h"
#include <string>
@@ -69,7 +69,7 @@ public:
const TransformMatrix &GetTransform() const { return m_matrix; };
EFFECT_TYPE GetType() const { return m_effect; };
- static boost::shared_ptr<Tweener> GetTweener(const TiXmlElement *pAnimationNode);
+ static std::shared_ptr<Tweener> GetTweener(const TiXmlElement *pAnimationNode);
protected:
TransformMatrix m_matrix;
EFFECT_TYPE m_effect;
@@ -81,7 +81,7 @@ private:
unsigned int m_length;
unsigned int m_delay;
- boost::shared_ptr<Tweener> m_pTweener;
+ std::shared_ptr<Tweener> m_pTweener;
};
class CFadeEffect : public CAnimEffect
@@ -216,7 +216,7 @@ private:
class CScroller
{
public:
- CScroller(unsigned int duration = 200, boost::shared_ptr<Tweener> tweener = boost::shared_ptr<Tweener>());
+ CScroller(unsigned int duration = 200, std::shared_ptr<Tweener> tweener = std::shared_ptr<Tweener>());
CScroller(const CScroller& right);
CScroller& operator=(const CScroller &src);
~CScroller();
@@ -260,5 +260,5 @@ private:
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<Tweener> m_pTweener;
+ std::shared_ptr<Tweener> m_pTweener;
};
diff --git a/xbmc/input/ButtonTranslator.cpp b/xbmc/input/ButtonTranslator.cpp
index cbaee9f541..f3e2ad2103 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 <boost/shared_ptr.hpp>
+
+#include <algorithm>
#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<CRegExp> re(new CRegExp(true, CRegExp::asciiOnly));
+ std::shared_ptr<CRegExp> 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<CRegExp> re(new CRegExp(true, CRegExp::asciiOnly));
+ std::shared_ptr<CRegExp> 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<CRegExp> altRe(new CRegExp(true, CRegExp::asciiOnly));
+ std::shared_ptr<CRegExp> 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<CRegExp> regex)
+bool CButtonTranslator::AddFamilyRegex(JoystickFamily* family, std::shared_ptr<CRegExp> 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 3bd47abc0e..97cafc41d0 100644
--- a/xbmc/input/ButtonTranslator.h
+++ b/xbmc/input/ButtonTranslator.h
@@ -27,6 +27,7 @@
#include <string>
#include <vector>
#include <set>
+#include <memory>
#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<AxisConfig> AxesConfig; // [<axis, isTrigger, rest state value>]
-namespace boost { template <typename T> class shared_ptr; }
struct CButtonAction
{
@@ -116,7 +116,7 @@ private:
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<boost::shared_ptr<CRegExp> > JoystickFamily;
+ typedef std::set<std::shared_ptr<CRegExp> > JoystickFamily;
typedef std::map<std::string, JoystickFamily> JoystickFamilyMap;
typedef std::map<int, std::string> ActionMap; // <button/axis, action>
typedef std::map<int, ActionMap > WindowMap; // <window, actionMap>
@@ -152,8 +152,8 @@ private:
void MapJoystickFamily(TiXmlNode *pFamily);
void MapJoystickActions(int windowID, TiXmlNode *pJoystick);
std::string JoynameToRegex(const std::string& joyName) const;
- bool AddFamilyRegex(JoystickFamily* family, boost::shared_ptr<CRegExp> regex);
- void MergeMap(boost::shared_ptr<CRegExp> joyName, JoystickMap *joystick, int windowID, const ActionMap &actionMap);
+ bool AddFamilyRegex(JoystickFamily* family, std::shared_ptr<CRegExp> regex);
+ void MergeMap(std::shared_ptr<CRegExp> joyName, JoystickMap *joystick, int windowID, const ActionMap &actionMap);
JoystickMap::const_iterator FindWindowMap(const std::string& joyName, const JoystickMap &maps) const;
JoystickFamilyMap::const_iterator FindJoystickFamily(const std::string& joyName) const;
JoystickFamilyMap m_joystickFamilies;
diff --git a/xbmc/input/KeyboardLayout.cpp b/xbmc/input/KeyboardLayout.cpp
index b930e65cf4..511c676b0e 100644
--- a/xbmc/input/KeyboardLayout.cpp
+++ b/xbmc/input/KeyboardLayout.cpp
@@ -24,6 +24,7 @@
#include "utils/StringUtils.h"
#include "utils/XBMCTinyXML.h"
#include <set>
+#include <algorithm>
#define KEYBOARD_LAYOUTS_XML "special://xbmc/system/keyboardlayouts.xml"
diff --git a/xbmc/input/SDLJoystick.cpp b/xbmc/input/SDLJoystick.cpp
index 9ccc78403c..306bc93356 100644
--- a/xbmc/input/SDLJoystick.cpp
+++ b/xbmc/input/SDLJoystick.cpp
@@ -29,7 +29,6 @@
#include "utils/RegExp.h"
#include <math.h>
-#include <boost/shared_ptr.hpp>
#ifdef HAS_SDL_JOYSTICK
#include <SDL2/SDL.h>
diff --git a/xbmc/input/SDLJoystick.h b/xbmc/input/SDLJoystick.h
index 17b479ff65..ee8488434d 100644
--- a/xbmc/input/SDLJoystick.h
+++ b/xbmc/input/SDLJoystick.h
@@ -26,6 +26,7 @@
#include <vector>
#include <string>
#include <map>
+#include <memory>
#define JACTIVE_BUTTON 0x00000001
#define JACTIVE_AXIS 0x00000002
@@ -62,7 +63,6 @@ struct AxisState {
};
class CRegExp;
-namespace boost { template <typename T> class shared_ptr; }
// Class to manage all connected joysticks
// Note: 'index' always refers to indices specific to this class,
diff --git a/xbmc/input/windows/WINJoystick.cpp b/xbmc/input/windows/WINJoystick.cpp
index e83b386bbe..7870c4cab9 100644
--- a/xbmc/input/windows/WINJoystick.cpp
+++ b/xbmc/input/windows/WINJoystick.cpp
@@ -27,7 +27,7 @@
#include "utils/RegExp.h"
#include <math.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <dinput.h>
#include <dinputd.h>
diff --git a/xbmc/input/windows/WINJoystick.h b/xbmc/input/windows/WINJoystick.h
index 1f6fcf2dde..dec177ac8e 100644
--- a/xbmc/input/windows/WINJoystick.h
+++ b/xbmc/input/windows/WINJoystick.h
@@ -22,6 +22,7 @@
#include <vector>
#include <string>
#include <map>
+#include <memory>
#include <stdint.h>
#include "settings/lib/ISettingCallback.h"
#include "threads/CriticalSection.h"
@@ -52,7 +53,6 @@ struct AxisConfig {
typedef std::vector<AxisConfig> AxesConfig; // [<axis, isTrigger, rest state value>]
class CRegExp;
-namespace boost { template <typename T> class shared_ptr; }
// Class to manage all connected joysticks
class CJoystick : public ISettingCallback
diff --git a/xbmc/interfaces/Builtins.cpp b/xbmc/interfaces/Builtins.cpp
index 339272d441..0791d875af 100644
--- a/xbmc/interfaces/Builtins.cpp
+++ b/xbmc/interfaces/Builtins.cpp
@@ -624,7 +624,7 @@ int CBuiltins::Execute(const std::string& execString)
AddonPtr addon;
if (CAddonMgr::Get().GetAddon(params[0], addon, ADDON_PLUGIN))
{
- PluginPtr plugin = boost::dynamic_pointer_cast<CPluginSource>(addon);
+ PluginPtr plugin = std::dynamic_pointer_cast<CPluginSource>(addon);
std::string addonid = params[0];
std::string urlParameters;
vector<string> parameters;
diff --git a/xbmc/interfaces/generic/ScriptInvocationManager.h b/xbmc/interfaces/generic/ScriptInvocationManager.h
index 4668bb3bae..1cbfbeb209 100644
--- a/xbmc/interfaces/generic/ScriptInvocationManager.h
+++ b/xbmc/interfaces/generic/ScriptInvocationManager.h
@@ -21,7 +21,7 @@
#include <map>
#include <set>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include "addons/IAddon.h"
#include "threads/CriticalSection.h"
@@ -29,7 +29,7 @@
class ILanguageInvocationHandler;
class ILanguageInvoker;
class CLanguageInvokerThread;
-typedef boost::shared_ptr<CLanguageInvokerThread> CLanguageInvokerThreadPtr;
+typedef std::shared_ptr<CLanguageInvokerThread> CLanguageInvokerThreadPtr;
class CScriptInvocationManager
{
diff --git a/xbmc/interfaces/info/InfoBool.h b/xbmc/interfaces/info/InfoBool.h
index a60e1678f4..1a6f9344ea 100644
--- a/xbmc/interfaces/info/InfoBool.h
+++ b/xbmc/interfaces/info/InfoBool.h
@@ -21,7 +21,7 @@
#pragma once
#include <string>
-#include "boost/shared_ptr.hpp"
+#include <memory>
class CGUIListItem;
@@ -84,5 +84,5 @@ private:
bool m_dirty; ///< whether we need an update
};
-typedef boost::shared_ptr<InfoBool> InfoPtr;
+typedef std::shared_ptr<InfoBool> InfoPtr;
};
diff --git a/xbmc/interfaces/info/InfoExpression.cpp b/xbmc/interfaces/info/InfoExpression.cpp
index f75eca89f3..da6fefdfc8 100644
--- a/xbmc/interfaces/info/InfoExpression.cpp
+++ b/xbmc/interfaces/info/InfoExpression.cpp
@@ -23,9 +23,7 @@
#include "utils/log.h"
#include "GUIInfoManager.h"
#include <list>
-#include <boost/shared_ptr.hpp>
-#include <boost/make_shared.hpp>
-#include <boost/pointer_cast.hpp>
+#include <memory>
using namespace std;
using namespace INFO;
@@ -47,7 +45,7 @@ InfoExpression::InfoExpression(const std::string &expression, int context)
if (!Parse(expression))
{
CLog::Log(LOGERROR, "Error parsing boolean expression %s", expression.c_str());
- m_expression_tree = boost::make_shared<InfoLeaf>(g_infoManager.Register("false", 0), false);
+ m_expression_tree = std::make_shared<InfoLeaf>(g_infoManager.Register("false", 0), false);
}
}
@@ -94,7 +92,7 @@ void InfoExpression::InfoAssociativeGroup::AddChild(const InfoSubexpressionPtr &
m_children.push_front(child); // largely undoes the effect of parsing right-associative
}
-void InfoExpression::InfoAssociativeGroup::Merge(boost::shared_ptr<InfoAssociativeGroup> other)
+void InfoExpression::InfoAssociativeGroup::Merge(std::shared_ptr<InfoAssociativeGroup> other)
{
m_children.splice(m_children.end(), other->m_children);
}
@@ -175,7 +173,7 @@ void InfoExpression::OperatorPop(std::stack<operator_t> &operator_stack, bool &i
* / \ / \ leaf leaf leaf leaf
* leaf leaf leaf leaf
*/
- boost::static_pointer_cast<InfoAssociativeGroup>(left)->Merge(boost::static_pointer_cast<InfoAssociativeGroup>(right));
+ std::static_pointer_cast<InfoAssociativeGroup>(left)->Merge(std::static_pointer_cast<InfoAssociativeGroup>(right));
else if (left_type == new_type)
/* For example: AND AND
* / \ / | \
@@ -183,7 +181,7 @@ void InfoExpression::OperatorPop(std::stack<operator_t> &operator_stack, bool &i
* / \ / \ / \
* leaf leaf leaf leaf leaf leaf
*/
- boost::static_pointer_cast<InfoAssociativeGroup>(left)->AddChild(right);
+ std::static_pointer_cast<InfoAssociativeGroup>(left)->AddChild(right);
else
{
nodes.pop();
@@ -195,7 +193,7 @@ void InfoExpression::OperatorPop(std::stack<operator_t> &operator_stack, bool &i
* / \ / \ / \
* leaf leaf leaf leaf leaf leaf
*/
- boost::static_pointer_cast<InfoAssociativeGroup>(right)->AddChild(left);
+ std::static_pointer_cast<InfoAssociativeGroup>(right)->AddChild(left);
nodes.push(right);
}
else
@@ -205,7 +203,7 @@ void InfoExpression::OperatorPop(std::stack<operator_t> &operator_stack, bool &i
* / \ / \ as children
* leaf leaf leaf leaf
*/
- nodes.push(boost::make_shared<InfoAssociativeGroup>(new_type, left, right));
+ nodes.push(std::make_shared<InfoAssociativeGroup>(new_type, left, right));
}
}
}
@@ -253,7 +251,7 @@ bool InfoExpression::Parse(const std::string &expression)
}
/* Propagate any listItem dependency from the operand to the expression */
m_listItemDependent |= info->ListItemDependent();
- nodes.push(boost::make_shared<InfoLeaf>(info, invert));
+ nodes.push(std::make_shared<InfoLeaf>(info, invert));
/* Reuse operand string for next operand */
operand.clear();
}
@@ -304,7 +302,7 @@ bool InfoExpression::Parse(const std::string &expression)
}
/* Propagate any listItem dependency from the operand to the expression */
m_listItemDependent |= info->ListItemDependent();
- nodes.push(boost::make_shared<InfoLeaf>(info, invert));
+ nodes.push(std::make_shared<InfoLeaf>(info, invert));
}
while (!operator_stack.empty())
OperatorPop(operator_stack, invert, nodes);
diff --git a/xbmc/interfaces/info/InfoExpression.h b/xbmc/interfaces/info/InfoExpression.h
index 70f23d3d44..8e35ca39a2 100644
--- a/xbmc/interfaces/info/InfoExpression.h
+++ b/xbmc/interfaces/info/InfoExpression.h
@@ -78,7 +78,7 @@ private:
virtual node_type_t Type() const=0;
};
- typedef boost::shared_ptr<InfoSubexpression> InfoSubexpressionPtr;
+ typedef std::shared_ptr<InfoSubexpression> InfoSubexpressionPtr;
// A leaf node in the expression tree
class InfoLeaf : public InfoSubexpression
@@ -98,7 +98,7 @@ private:
public:
InfoAssociativeGroup(node_type_t type, const InfoSubexpressionPtr &left, const InfoSubexpressionPtr &right);
void AddChild(const InfoSubexpressionPtr &child);
- void Merge(boost::shared_ptr<InfoAssociativeGroup> other);
+ void Merge(std::shared_ptr<InfoAssociativeGroup> other);
virtual bool Evaluate(const CGUIListItem *item);
virtual node_type_t Type() const { return m_type; };
private:
diff --git a/xbmc/interfaces/json-rpc/AddonsOperations.cpp b/xbmc/interfaces/json-rpc/AddonsOperations.cpp
index bb3b0cea43..390351f6b7 100644
--- a/xbmc/interfaces/json-rpc/AddonsOperations.cpp
+++ b/xbmc/interfaces/json-rpc/AddonsOperations.cpp
@@ -106,7 +106,7 @@ JSONRPC_STATUS CAddonsOperations::GetAddons(const std::string &method, ITranspor
{
PluginPtr plugin;
if (content != CPluginSource::UNKNOWN)
- plugin = boost::dynamic_pointer_cast<CPluginSource>(addons.at(index));
+ plugin = std::dynamic_pointer_cast<CPluginSource>(addons.at(index));
if ((addons.at(index)->Type() <= ADDON_UNKNOWN || addons.at(index)->Type() >= ADDON_MAX) ||
((content != CPluginSource::UNKNOWN && plugin == NULL) || (plugin != NULL && !plugin->Provides(content))))
diff --git a/xbmc/interfaces/json-rpc/JSONServiceDescription.h b/xbmc/interfaces/json-rpc/JSONServiceDescription.h
index b8e895c74c..c033fccf4e 100644
--- a/xbmc/interfaces/json-rpc/JSONServiceDescription.h
+++ b/xbmc/interfaces/json-rpc/JSONServiceDescription.h
@@ -22,14 +22,14 @@
#include <string>
#include <vector>
#include <limits>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include "JSONUtils.h"
namespace JSONRPC
{
class JSONSchemaTypeDefinition;
- typedef boost::shared_ptr<JSONSchemaTypeDefinition> JSONSchemaTypeDefinitionPtr;
+ typedef std::shared_ptr<JSONSchemaTypeDefinition> JSONSchemaTypeDefinitionPtr;
/*!
\ingroup jsonrpc
diff --git a/xbmc/interfaces/json-rpc/PlayerOperations.h b/xbmc/interfaces/json-rpc/PlayerOperations.h
index b2c9274287..fcaf009faa 100644
--- a/xbmc/interfaces/json-rpc/PlayerOperations.h
+++ b/xbmc/interfaces/json-rpc/PlayerOperations.h
@@ -25,7 +25,7 @@
namespace EPG
{
class CEpgInfoTag;
- typedef boost::shared_ptr<EPG::CEpgInfoTag> CEpgInfoTagPtr;
+ typedef std::shared_ptr<EPG::CEpgInfoTag> CEpgInfoTagPtr;
}
namespace JSONRPC
diff --git a/xbmc/interfaces/legacy/ListItem.cpp b/xbmc/interfaces/legacy/ListItem.cpp
index 137c4cbaa9..9ca0fc9280 100644
--- a/xbmc/interfaces/legacy/ListItem.cpp
+++ b/xbmc/interfaces/legacy/ListItem.cpp
@@ -18,6 +18,7 @@
*
*/
+#include <cstdlib>
#include <sstream>
#include "ListItem.h"
diff --git a/xbmc/interfaces/legacy/Monitor.cpp b/xbmc/interfaces/legacy/Monitor.cpp
index 5f992a568c..a1c9912d0c 100644
--- a/xbmc/interfaces/legacy/Monitor.cpp
+++ b/xbmc/interfaces/legacy/Monitor.cpp
@@ -18,6 +18,7 @@
*
*/
+#include <algorithm>
#include "Monitor.h"
#include <math.h>
diff --git a/xbmc/interfaces/python/XBPython.h b/xbmc/interfaces/python/XBPython.h
index 972281a4e9..f2ea909456 100644
--- a/xbmc/interfaces/python/XBPython.h
+++ b/xbmc/interfaces/python/XBPython.h
@@ -28,7 +28,7 @@
#include "interfaces/generic/ILanguageInvocationHandler.h"
#include "addons/IAddon.h"
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <vector>
class CPythonInvoker;
diff --git a/xbmc/linux/DBusReserve.cpp b/xbmc/linux/DBusReserve.cpp
index d3a4c9a345..adc55bbb5a 100644
--- a/xbmc/linux/DBusReserve.cpp
+++ b/xbmc/linux/DBusReserve.cpp
@@ -23,6 +23,7 @@
#include <dbus/dbus.h>
#include <climits>
+#include <algorithm>
#include "utils/log.h"
diff --git a/xbmc/linux/LinuxTimezone.cpp b/xbmc/linux/LinuxTimezone.cpp
index 7164d42d48..0be1ae7690 100644
--- a/xbmc/linux/LinuxTimezone.cpp
+++ b/xbmc/linux/LinuxTimezone.cpp
@@ -39,6 +39,8 @@
#include "settings/lib/Setting.h"
#include "settings/Settings.h"
+#include <algorithm>
+
using namespace std;
CLinuxTimezone::CLinuxTimezone() : m_IsDST(0)
diff --git a/xbmc/linux/PosixMountProvider.cpp b/xbmc/linux/PosixMountProvider.cpp
index 610d0d7ee1..218d10bee6 100644
--- a/xbmc/linux/PosixMountProvider.cpp
+++ b/xbmc/linux/PosixMountProvider.cpp
@@ -17,6 +17,9 @@
* <http://www.gnu.org/licenses/>.
*
*/
+
+#include <cstdlib>
+
#include "PosixMountProvider.h"
#include "utils/RegExp.h"
#include "utils/URIUtils.h"
diff --git a/xbmc/linux/XFileUtils.cpp b/xbmc/linux/XFileUtils.cpp
index b472ce2a45..ac5d9e1cfc 100644
--- a/xbmc/linux/XFileUtils.cpp
+++ b/xbmc/linux/XFileUtils.cpp
@@ -23,6 +23,7 @@
#include "XFileUtils.h"
#include "XTimeUtils.h"
#include "filesystem/SpecialProtocol.h"
+#include "utils/StringUtils.h"
#ifdef TARGET_POSIX
#include "XHandle.h"
@@ -50,7 +51,6 @@
#include "utils/log.h"
#include "utils/RegExp.h"
#include "utils/AliasShortcutUtils.h"
-#include "utils/StringUtils.h"
HANDLE FindFirstFile(LPCSTR szPath,LPWIN32_FIND_DATA lpFindData)
{
diff --git a/xbmc/linux/XHandle.cpp b/xbmc/linux/XHandle.cpp
index 70ff8cd798..14fe45f1b8 100644
--- a/xbmc/linux/XHandle.cpp
+++ b/xbmc/linux/XHandle.cpp
@@ -22,6 +22,8 @@
#include "utils/log.h"
#include "threads/SingleLock.h"
+#include <cassert>
+
int CXHandle::m_objectTracker[10] = {0};
HANDLE WINAPI GetCurrentProcess(void) {
diff --git a/xbmc/listproviders/DirectoryProvider.cpp b/xbmc/listproviders/DirectoryProvider.cpp
index d410137a0b..8067691c6f 100644
--- a/xbmc/listproviders/DirectoryProvider.cpp
+++ b/xbmc/listproviders/DirectoryProvider.cpp
@@ -34,9 +34,10 @@
#include "video/VideoThumbLoader.h"
#include "music/MusicThumbLoader.h"
#include "pictures/PictureThumbLoader.h"
-#include "boost/make_shared.hpp"
#include "interfaces/AnnouncementManager.h"
+#include <memory>
+
using namespace std;
using namespace XFILE;
using namespace ANNOUNCEMENT;
@@ -84,7 +85,7 @@ public:
return true;
}
- boost::shared_ptr<CThumbLoader> getThumbLoader(CGUIStaticItemPtr &item)
+ std::shared_ptr<CThumbLoader> getThumbLoader(CGUIStaticItemPtr &item)
{
if (item->IsVideo())
{
@@ -110,7 +111,7 @@ public:
{
if (!m_thumbloaders.count(type))
{
- boost::shared_ptr<CThumbLoader> thumbLoader = boost::make_shared<CThumbLoaderClass>();
+ std::shared_ptr<CThumbLoader> thumbLoader = std::make_shared<CThumbLoaderClass>();
thumbLoader->OnLoaderStart();
m_thumbloaders.insert(make_pair(type, thumbLoader));
}
@@ -121,7 +122,7 @@ public:
std::vector<InfoTagType> GetItemTypes(std::vector<InfoTagType> &itemTypes) const
{
itemTypes.clear();
- for (std::map<InfoTagType, boost::shared_ptr<CThumbLoader> >::const_iterator
+ for (std::map<InfoTagType, std::shared_ptr<CThumbLoader> >::const_iterator
i = m_thumbloaders.begin(); i != m_thumbloaders.end(); ++i)
itemTypes.push_back(i->first);
return itemTypes;
@@ -132,7 +133,7 @@ private:
unsigned int m_limit;
int m_parentID;
std::vector<CGUIStaticItemPtr> m_items;
- std::map<InfoTagType, boost::shared_ptr<CThumbLoader> > m_thumbloaders;
+ std::map<InfoTagType, std::shared_ptr<CThumbLoader> > m_thumbloaders;
};
CDirectoryProvider::CDirectoryProvider(const TiXmlElement *element, int parentID)
@@ -262,7 +263,7 @@ void CDirectoryProvider::OnJobComplete(unsigned int jobID, bool success, CJob *j
bool CDirectoryProvider::OnClick(const CGUIListItemPtr &item)
{
- CFileItem fileItem(*boost::static_pointer_cast<CFileItem>(item));
+ CFileItem fileItem(*std::static_pointer_cast<CFileItem>(item));
string target = fileItem.GetProperty("node.target").asString();
if (target.empty())
target = m_currentTarget;
diff --git a/xbmc/listproviders/IListProvider.h b/xbmc/listproviders/IListProvider.h
index aa7b5be985..137a8a1252 100644
--- a/xbmc/listproviders/IListProvider.h
+++ b/xbmc/listproviders/IListProvider.h
@@ -21,11 +21,11 @@
#pragma once
#include <vector>
-#include "boost/shared_ptr.hpp"
+#include <memory>
class TiXmlNode;
class CGUIListItem;
-typedef boost::shared_ptr<CGUIListItem> CGUIListItemPtr;
+typedef std::shared_ptr<CGUIListItem> CGUIListItemPtr;
/*!
\ingroup listproviders
diff --git a/xbmc/listproviders/StaticProvider.cpp b/xbmc/listproviders/StaticProvider.cpp
index 043d5e3298..17ba5eb315 100644
--- a/xbmc/listproviders/StaticProvider.cpp
+++ b/xbmc/listproviders/StaticProvider.cpp
@@ -121,6 +121,6 @@ bool CStaticListProvider::AlwaysFocusDefaultItem() const
bool CStaticListProvider::OnClick(const CGUIListItemPtr &item)
{
- CGUIStaticItemPtr staticItem = boost::static_pointer_cast<CGUIStaticItem>(item);
+ CGUIStaticItemPtr staticItem = std::static_pointer_cast<CGUIStaticItem>(item);
return staticItem->GetClickActions().ExecuteActions(0, m_parentID);
}
diff --git a/xbmc/music/Album.cpp b/xbmc/music/Album.cpp
index 0307d91f45..447f6e05f5 100644
--- a/xbmc/music/Album.cpp
+++ b/xbmc/music/Album.cpp
@@ -25,6 +25,8 @@
#include "utils/MathUtils.h"
#include "FileItem.h"
+#include <algorithm>
+
using namespace std;
using namespace MUSIC_INFO;
diff --git a/xbmc/music/Artist.cpp b/xbmc/music/Artist.cpp
index 89c5dc9932..c25f271258 100644
--- a/xbmc/music/Artist.cpp
+++ b/xbmc/music/Artist.cpp
@@ -22,6 +22,8 @@
#include "utils/XMLUtils.h"
#include "settings/AdvancedSettings.h"
+#include <algorithm>
+
using namespace std;
void CArtist::MergeScrapedArtist(const CArtist& source, bool override /* = true */)
diff --git a/xbmc/music/MusicDatabase.cpp b/xbmc/music/MusicDatabase.cpp
index 0647eafcf3..98d0ad9913 100644
--- a/xbmc/music/MusicDatabase.cpp
+++ b/xbmc/music/MusicDatabase.cpp
@@ -4579,7 +4579,7 @@ bool CMusicDatabase::GetScraperForPath(const std::string& strPath, ADDON::Scrape
ADDON::AddonPtr addon;
if (!scraperUUID.empty() && ADDON::CAddonMgr::Get().GetAddon(scraperUUID, addon) && addon)
{
- info = boost::dynamic_pointer_cast<ADDON::CScraper>(addon->Clone());
+ info = std::dynamic_pointer_cast<ADDON::CScraper>(addon->Clone());
if (!info)
return false;
// store this path's settings
@@ -4591,7 +4591,7 @@ bool CMusicDatabase::GetScraperForPath(const std::string& strPath, ADDON::Scrape
ADDON::AddonPtr defaultScraper;
if (ADDON::CAddonMgr::Get().GetDefault(type, defaultScraper))
{
- info = boost::dynamic_pointer_cast<ADDON::CScraper>(defaultScraper->Clone());
+ info = std::dynamic_pointer_cast<ADDON::CScraper>(defaultScraper->Clone());
}
}
}
@@ -4602,7 +4602,7 @@ bool CMusicDatabase::GetScraperForPath(const std::string& strPath, ADDON::Scrape
ADDON::AddonPtr addon;
if(ADDON::CAddonMgr::Get().GetDefault(type, addon))
{
- info = boost::dynamic_pointer_cast<ADDON::CScraper>(addon);
+ info = std::dynamic_pointer_cast<ADDON::CScraper>(addon);
return info != NULL;
}
else
diff --git a/xbmc/music/infoscanner/MusicInfoScanner.cpp b/xbmc/music/infoscanner/MusicInfoScanner.cpp
index 0c1b305139..3b20472e0e 100644
--- a/xbmc/music/infoscanner/MusicInfoScanner.cpp
+++ b/xbmc/music/infoscanner/MusicInfoScanner.cpp
@@ -745,10 +745,10 @@ int CMusicInfoScanner::RetrieveMusicInfo(const std::string& strDirectory, CFileI
ADDON::ScraperPtr albumScraper;
ADDON::ScraperPtr artistScraper;
if(ADDON::CAddonMgr::Get().GetDefault(ADDON::ADDON_SCRAPER_ALBUMS, addon))
- albumScraper = boost::dynamic_pointer_cast<ADDON::CScraper>(addon);
+ albumScraper = std::dynamic_pointer_cast<ADDON::CScraper>(addon);
if(ADDON::CAddonMgr::Get().GetDefault(ADDON::ADDON_SCRAPER_ARTISTS, addon))
- artistScraper = boost::dynamic_pointer_cast<ADDON::CScraper>(addon);
+ artistScraper = std::dynamic_pointer_cast<ADDON::CScraper>(addon);
// Add each album
for (VECALBUMS::iterator album = albums.begin(); album != albums.end(); ++album)
diff --git a/xbmc/music/karaoke/karaokelyricstextustar.cpp b/xbmc/music/karaoke/karaokelyricstextustar.cpp
index 15712c6692..7aba9eb8ed 100644
--- a/xbmc/music/karaoke/karaokelyricstextustar.cpp
+++ b/xbmc/music/karaoke/karaokelyricstextustar.cpp
@@ -20,6 +20,7 @@
// C++ Implementation: karaokelyricstextlrc
+#include <cstdlib>
#include <math.h>
#include "filesystem/File.h"
diff --git a/xbmc/music/tags/MusicInfoTagLoaderASAP.cpp b/xbmc/music/tags/MusicInfoTagLoaderASAP.cpp
index 5bb44936d7..46f6a63ffb 100644
--- a/xbmc/music/tags/MusicInfoTagLoaderASAP.cpp
+++ b/xbmc/music/tags/MusicInfoTagLoaderASAP.cpp
@@ -17,6 +17,7 @@
* <http://www.gnu.org/licenses/>.
*
*/
+#include <cstdlib>
#include "MusicInfoTagLoaderASAP.h"
#include "utils/URIUtils.h"
diff --git a/xbmc/music/tags/MusicInfoTagLoaderSPC.cpp b/xbmc/music/tags/MusicInfoTagLoaderSPC.cpp
index 11e9563095..50249e8d84 100644
--- a/xbmc/music/tags/MusicInfoTagLoaderSPC.cpp
+++ b/xbmc/music/tags/MusicInfoTagLoaderSPC.cpp
@@ -18,6 +18,7 @@
*
*/
+#include <cstdlib>
#include "MusicInfoTagLoaderSPC.h"
#include "snesapu/Types.h"
diff --git a/xbmc/music/windows/GUIWindowMusicNav.cpp b/xbmc/music/windows/GUIWindowMusicNav.cpp
index e9dd128483..2a95cc9174 100644
--- a/xbmc/music/windows/GUIWindowMusicNav.cpp
+++ b/xbmc/music/windows/GUIWindowMusicNav.cpp
@@ -714,7 +714,7 @@ bool CGUIWindowMusicNav::OnContextButton(int itemNumber, CONTEXT_BUTTON button)
ADDON::AddonPtr defaultScraper;
if (ADDON::CAddonMgr::Get().GetDefault(ADDON::ScraperTypeFromContent(content), defaultScraper))
{
- scraper = boost::dynamic_pointer_cast<ADDON::CScraper>(defaultScraper->Clone());
+ scraper = std::dynamic_pointer_cast<ADDON::CScraper>(defaultScraper->Clone());
}
}
diff --git a/xbmc/network/EventServer.cpp b/xbmc/network/EventServer.cpp
index d76fbc4785..66646fe546 100644
--- a/xbmc/network/EventServer.cpp
+++ b/xbmc/network/EventServer.cpp
@@ -37,6 +37,7 @@
#include "guilib/Key.h"
#include <map>
#include <queue>
+#include <cassert>
using namespace EVENTSERVER;
using namespace EVENTPACKET;
diff --git a/xbmc/network/WebServer.cpp b/xbmc/network/WebServer.cpp
index 05a8efc72b..9e69ff4f44 100644
--- a/xbmc/network/WebServer.cpp
+++ b/xbmc/network/WebServer.cpp
@@ -25,7 +25,8 @@
#include "WebServer.h"
#ifdef HAS_WEB_SERVER
-#include <boost/make_shared.hpp>
+#include <memory>
+#include <algorithm>
#include "URL.h"
#include "Util.h"
@@ -65,7 +66,7 @@ typedef struct ConnectionHandler
} ConnectionHandler;
typedef struct {
- boost::shared_ptr<XFILE::CFile> file;
+ std::shared_ptr<XFILE::CFile> file;
CHttpRanges ranges;
size_t rangeCountTotal;
string boundary;
@@ -729,7 +730,7 @@ int CWebServer::CreateFileDownloadResponse(IHTTPRequestHandler *handler, struct
const HTTPResponseDetails &responseDetails = handler->GetResponseDetails();
HttpResponseRanges responseRanges = handler->GetResponseData();
- boost::shared_ptr<XFILE::CFile> file = boost::make_shared<XFILE::CFile>();
+ std::shared_ptr<XFILE::CFile> file = std::make_shared<XFILE::CFile>();
std::string filePath = handler->GetResponseFile();
if (!file->Open(filePath, READ_NO_CACHE))
diff --git a/xbmc/network/ZeroconfBrowser.cpp b/xbmc/network/ZeroconfBrowser.cpp
index 2f37d01c55..effd056831 100644
--- a/xbmc/network/ZeroconfBrowser.cpp
+++ b/xbmc/network/ZeroconfBrowser.cpp
@@ -21,6 +21,7 @@
#include "ZeroconfBrowser.h"
#include <stdexcept>
#include "utils/log.h"
+#include <cassert>
#if defined (HAS_AVAHI)
#include "linux/ZeroconfBrowserAvahi.h"
diff --git a/xbmc/network/linux/NetworkLinux.cpp b/xbmc/network/linux/NetworkLinux.cpp
index cea86e5ac0..a73d4d2143 100644
--- a/xbmc/network/linux/NetworkLinux.cpp
+++ b/xbmc/network/linux/NetworkLinux.cpp
@@ -18,6 +18,8 @@
*
*/
+#include <cstdlib>
+
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <netinet/in.h>
diff --git a/xbmc/network/linux/ZeroconfAvahi.h b/xbmc/network/linux/ZeroconfAvahi.h
index e0b46b569c..c66e660965 100644
--- a/xbmc/network/linux/ZeroconfAvahi.h
+++ b/xbmc/network/linux/ZeroconfAvahi.h
@@ -29,7 +29,7 @@
#include <string>
#include "network/Zeroconf.h"
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <avahi-client/client.h>
#include <avahi-client/publish.h>
#include <avahi-common/defs.h>
@@ -74,7 +74,7 @@ private:
//helper struct for holding information about creating a service / AvahiEntryGroup
//we have to hold that as it's needed to recreate the service
class ServiceInfo;
- typedef std::map<std::string, boost::shared_ptr<ServiceInfo> > tServiceMap;
+ typedef std::map<std::string, std::shared_ptr<ServiceInfo> > tServiceMap;
//goes through a list of todos and publishs them (takes the client a param, as it might be called from
// from the callbacks)
diff --git a/xbmc/network/upnp/UPnPInternal.cpp b/xbmc/network/upnp/UPnPInternal.cpp
index 95273c2e2d..d9522069c2 100644
--- a/xbmc/network/upnp/UPnPInternal.cpp
+++ b/xbmc/network/upnp/UPnPInternal.cpp
@@ -43,6 +43,8 @@
#include "settings/Settings.h"
#include "utils/LangCodeExpander.h"
+#include <algorithm>
+
using namespace MUSIC_INFO;
using namespace XFILE;
diff --git a/xbmc/pictures/Picture.cpp b/xbmc/pictures/Picture.cpp
index 5e9c23ece3..7682479f89 100644
--- a/xbmc/pictures/Picture.cpp
+++ b/xbmc/pictures/Picture.cpp
@@ -23,6 +23,8 @@
#include "config.h"
#endif
+#include <algorithm>
+
#include "Picture.h"
#include "settings/AdvancedSettings.h"
#include "settings/Settings.h"
diff --git a/xbmc/pictures/PictureInfoTag.cpp b/xbmc/pictures/PictureInfoTag.cpp
index 9704a4b77f..fce32213cc 100644
--- a/xbmc/pictures/PictureInfoTag.cpp
+++ b/xbmc/pictures/PictureInfoTag.cpp
@@ -18,6 +18,9 @@
*
*/
+#include <cstdlib>
+#include <algorithm>
+
#include "PictureInfoTag.h"
#include "XBDateTime.h"
#include "Util.h"
diff --git a/xbmc/playlists/PlayList.cpp b/xbmc/playlists/PlayList.cpp
index 5aa96b8a93..de15e9225c 100644
--- a/xbmc/playlists/PlayList.cpp
+++ b/xbmc/playlists/PlayList.cpp
@@ -30,6 +30,9 @@
#include "utils/StringUtils.h"
#include "interfaces/AnnouncementManager.h"
+#include <cassert>
+#include <algorithm>
+
//using namespace std;
using namespace MUSIC_INFO;
using namespace XFILE;
diff --git a/xbmc/playlists/PlayList.h b/xbmc/playlists/PlayList.h
index 09aabfe672..20fb964760 100644
--- a/xbmc/playlists/PlayList.h
+++ b/xbmc/playlists/PlayList.h
@@ -20,7 +20,7 @@
*/
#include "FileItem.h"
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <string>
namespace PLAYLIST
@@ -93,5 +93,5 @@ private:
void AnnounceAdd(const CFileItemPtr& item, int pos);
};
-typedef boost::shared_ptr<CPlayList> CPlayListPtr;
+typedef std::shared_ptr<CPlayList> CPlayListPtr;
}
diff --git a/xbmc/playlists/SmartPlayList.cpp b/xbmc/playlists/SmartPlayList.cpp
index a0d86b4c4e..bbc51f2504 100644
--- a/xbmc/playlists/SmartPlayList.cpp
+++ b/xbmc/playlists/SmartPlayList.cpp
@@ -875,7 +875,7 @@ std::string CSmartPlaylistRuleCombination::GetWhereClause(const CDatabase &db, c
{
if (it != m_combinations.begin())
rule += m_type == CombinationAnd ? " AND " : " OR ";
- boost::shared_ptr<CSmartPlaylistRuleCombination> combo = boost::static_pointer_cast<CSmartPlaylistRuleCombination>(*it);
+ std::shared_ptr<CSmartPlaylistRuleCombination> combo = std::static_pointer_cast<CSmartPlaylistRuleCombination>(*it);
if (combo)
rule += "(" + combo->GetWhereClause(db, strType, referencedPlaylists) + ")";
}
@@ -934,7 +934,7 @@ void CSmartPlaylistRuleCombination::GetVirtualFolders(const std::string& strType
{
for (CDatabaseQueryRuleCombinations::const_iterator it = m_combinations.begin(); it != m_combinations.end(); ++it)
{
- boost::shared_ptr<CSmartPlaylistRuleCombination> combo = boost::static_pointer_cast<CSmartPlaylistRuleCombination>(*it);
+ std::shared_ptr<CSmartPlaylistRuleCombination> combo = std::static_pointer_cast<CSmartPlaylistRuleCombination>(*it);
if (combo)
combo->GetVirtualFolders(strType, virtualFolders);
}
@@ -965,7 +965,7 @@ void CSmartPlaylistRuleCombination::GetVirtualFolders(const std::string& strType
void CSmartPlaylistRuleCombination::AddRule(const CSmartPlaylistRule &rule)
{
- boost::shared_ptr<CSmartPlaylistRule> ptr(new CSmartPlaylistRule(rule));
+ std::shared_ptr<CSmartPlaylistRule> ptr(new CSmartPlaylistRule(rule));
m_rules.push_back(ptr);
}
diff --git a/xbmc/playlists/SmartPlayList.h b/xbmc/playlists/SmartPlayList.h
index 5813b0ae87..abdfd35ee1 100644
--- a/xbmc/playlists/SmartPlayList.h
+++ b/xbmc/playlists/SmartPlayList.h
@@ -22,7 +22,7 @@
#include <set>
#include <string>
#include <vector>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include "dbwrappers/DatabaseQuery.h"
#include "utils/SortUtils.h"
diff --git a/xbmc/pvr/PVRGUIInfo.h b/xbmc/pvr/PVRGUIInfo.h
index 9e66e6d62e..e71cc9d18f 100644
--- a/xbmc/pvr/PVRGUIInfo.h
+++ b/xbmc/pvr/PVRGUIInfo.h
@@ -28,7 +28,7 @@
namespace EPG
{
class CEpgInfoTag;
- typedef boost::shared_ptr<EPG::CEpgInfoTag> CEpgInfoTagPtr;
+ typedef std::shared_ptr<EPG::CEpgInfoTag> CEpgInfoTagPtr;
}
namespace PVR
diff --git a/xbmc/pvr/PVRManager.h b/xbmc/pvr/PVRManager.h
index bf0532cb42..b8b9e97536 100644
--- a/xbmc/pvr/PVRManager.h
+++ b/xbmc/pvr/PVRManager.h
@@ -44,7 +44,7 @@ namespace PVR
{
class CPVRClients;
class CPVRChannel;
- typedef boost::shared_ptr<PVR::CPVRChannel> CPVRChannelPtr;
+ typedef std::shared_ptr<PVR::CPVRChannel> CPVRChannelPtr;
class CPVRChannelGroupsContainer;
class CPVRChannelGroup;
class CPVRRecordings;
@@ -83,7 +83,7 @@ namespace PVR
#define g_PVRRecordings g_PVRManager.Recordings()
#define g_PVRClients g_PVRManager.Clients()
- typedef boost::shared_ptr<PVR::CPVRChannelGroup> CPVRChannelGroupPtr;
+ typedef std::shared_ptr<PVR::CPVRChannelGroup> CPVRChannelGroupPtr;
class CPVRManager : public ISettingCallback, private CThread, public Observable, public ANNOUNCEMENT::IAnnouncer
{
diff --git a/xbmc/pvr/addons/PVRClient.h b/xbmc/pvr/addons/PVRClient.h
index 58695cdda0..b6f3eb5aba 100644
--- a/xbmc/pvr/addons/PVRClient.h
+++ b/xbmc/pvr/addons/PVRClient.h
@@ -42,7 +42,7 @@ namespace PVR
class CPVRClient;
typedef std::vector<PVR_MENUHOOK> PVR_MENUHOOKS;
- typedef boost::shared_ptr<CPVRClient> PVR_CLIENT;
+ typedef std::shared_ptr<CPVRClient> PVR_CLIENT;
#define PVR_INVALID_CLIENT_ID (-2)
/*!
diff --git a/xbmc/pvr/addons/PVRClients.cpp b/xbmc/pvr/addons/PVRClients.cpp
index affe21638f..961373b36b 100644
--- a/xbmc/pvr/addons/PVRClients.cpp
+++ b/xbmc/pvr/addons/PVRClients.cpp
@@ -868,7 +868,7 @@ int CPVRClients::RegisterClient(AddonPtr client, bool* newRegistration/*=NULL*/)
else
{
// create a new client instance
- addon = boost::dynamic_pointer_cast<CPVRClient>(client);
+ addon = std::dynamic_pointer_cast<CPVRClient>(client);
m_clientMap.insert(std::make_pair(iClientId, addon));
}
}
diff --git a/xbmc/pvr/addons/PVRClients.h b/xbmc/pvr/addons/PVRClients.h
index 550244a928..23bb080a01 100644
--- a/xbmc/pvr/addons/PVRClients.h
+++ b/xbmc/pvr/addons/PVRClients.h
@@ -39,7 +39,7 @@ namespace PVR
{
class CPVRGUIInfo;
- typedef boost::shared_ptr<CPVRClient> PVR_CLIENT;
+ typedef std::shared_ptr<CPVRClient> PVR_CLIENT;
typedef std::map< int, PVR_CLIENT > PVR_CLIENTMAP;
typedef std::map< int, PVR_CLIENT >::iterator PVR_CLIENTMAP_ITR;
typedef std::map< int, PVR_CLIENT >::const_iterator PVR_CLIENTMAP_CITR;
diff --git a/xbmc/pvr/channels/PVRChannel.h b/xbmc/pvr/channels/PVRChannel.h
index 2ea41ed9be..7fd23596f5 100644
--- a/xbmc/pvr/channels/PVRChannel.h
+++ b/xbmc/pvr/channels/PVRChannel.h
@@ -27,7 +27,7 @@
#include "threads/CriticalSection.h"
#include "utils/ISerializable.h"
-#include <boost/shared_ptr.hpp>
+#include <memory>
#define PVR_INVALID_CHANNEL_UID -1
@@ -35,7 +35,7 @@ namespace EPG
{
class CEpg;
class CEpgInfoTag;
- typedef boost::shared_ptr<CEpgInfoTag> CEpgInfoTagPtr;
+ typedef std::shared_ptr<CEpgInfoTag> CEpgInfoTagPtr;
}
@@ -45,7 +45,7 @@ namespace PVR
class CPVRChannelGroupInternal;
class CPVRChannel;
- typedef boost::shared_ptr<PVR::CPVRChannel> CPVRChannelPtr;
+ typedef std::shared_ptr<PVR::CPVRChannel> CPVRChannelPtr;
typedef struct
{
diff --git a/xbmc/pvr/channels/PVRChannelGroup.h b/xbmc/pvr/channels/PVRChannelGroup.h
index ab9dd2b52e..959a7a0a30 100644
--- a/xbmc/pvr/channels/PVRChannelGroup.h
+++ b/xbmc/pvr/channels/PVRChannelGroup.h
@@ -25,7 +25,7 @@
#include "settings/lib/ISettingCallback.h"
#include "utils/JobManager.h"
-#include <boost/shared_ptr.hpp>
+#include <memory>
namespace EPG
{
@@ -59,7 +59,7 @@ namespace PVR
};
class CPVRChannelGroup;
- typedef boost::shared_ptr<PVR::CPVRChannelGroup> CPVRChannelGroupPtr;
+ typedef std::shared_ptr<PVR::CPVRChannelGroup> CPVRChannelGroupPtr;
/** A group of channels */
class CPVRChannelGroup : public Observable,
diff --git a/xbmc/pvr/dialogs/GUIDialogPVRGuideInfo.h b/xbmc/pvr/dialogs/GUIDialogPVRGuideInfo.h
index cf10a8dc2d..dc6ea703f0 100644
--- a/xbmc/pvr/dialogs/GUIDialogPVRGuideInfo.h
+++ b/xbmc/pvr/dialogs/GUIDialogPVRGuideInfo.h
@@ -20,12 +20,12 @@
*/
#include "guilib/GUIDialog.h"
-#include <boost/shared_ptr.hpp>
+#include <memory>
namespace EPG
{
class CEpgInfoTag;
- typedef boost::shared_ptr<EPG::CEpgInfoTag> CEpgInfoTagPtr;
+ typedef std::shared_ptr<EPG::CEpgInfoTag> CEpgInfoTagPtr;
}
namespace PVR
diff --git a/xbmc/pvr/recordings/PVRRecording.h b/xbmc/pvr/recordings/PVRRecording.h
index 0c14f6ed0b..c3a9adac87 100644
--- a/xbmc/pvr/recordings/PVRRecording.h
+++ b/xbmc/pvr/recordings/PVRRecording.h
@@ -45,7 +45,7 @@ namespace PVR
{
class CPVRRecording;
- typedef boost::shared_ptr<PVR::CPVRRecording> CPVRRecordingPtr;
+ typedef std::shared_ptr<PVR::CPVRRecording> CPVRRecordingPtr;
/*!
* @brief Representation of a CPVRRecording unique ID.
diff --git a/xbmc/pvr/timers/PVRTimerInfoTag.h b/xbmc/pvr/timers/PVRTimerInfoTag.h
index 9643913860..8e07ad0e20 100644
--- a/xbmc/pvr/timers/PVRTimerInfoTag.h
+++ b/xbmc/pvr/timers/PVRTimerInfoTag.h
@@ -41,14 +41,14 @@
#include "addons/include/xbmc_pvr_types.h"
#include "utils/ISerializable.h"
-#include <boost/shared_ptr.hpp>
+#include <memory>
class CFileItem;
namespace EPG
{
class CEpgInfoTag;
- typedef boost::shared_ptr<EPG::CEpgInfoTag> CEpgInfoTagPtr;
+ typedef std::shared_ptr<EPG::CEpgInfoTag> CEpgInfoTagPtr;
}
namespace PVR
@@ -58,10 +58,10 @@ namespace PVR
class CPVRChannelGroupInternal;
class CPVRChannel;
- typedef boost::shared_ptr<PVR::CPVRChannel> CPVRChannelPtr;
+ typedef std::shared_ptr<PVR::CPVRChannel> CPVRChannelPtr;
class CPVRTimerInfoTag;
- typedef boost::shared_ptr<PVR::CPVRTimerInfoTag> CPVRTimerInfoTagPtr;
+ typedef std::shared_ptr<PVR::CPVRTimerInfoTag> CPVRTimerInfoTagPtr;
class CPVRTimerInfoTag : public ISerializable
{
diff --git a/xbmc/settings/SettingUtils.cpp b/xbmc/settings/SettingUtils.cpp
index bb17374a00..51f3877fe9 100644
--- a/xbmc/settings/SettingUtils.cpp
+++ b/xbmc/settings/SettingUtils.cpp
@@ -36,7 +36,7 @@ bool CSettingUtils::SetList(CSettingList *settingList, const std::vector<CVarian
return settingList->SetValue(newValues);
}
-std::vector<CVariant> CSettingUtils::ListToValues(const CSettingList *setting, const std::vector< boost::shared_ptr<CSetting> > &values)
+std::vector<CVariant> CSettingUtils::ListToValues(const CSettingList *setting, const std::vector< std::shared_ptr<CSetting> > &values)
{
std::vector<CVariant> realValues;
@@ -72,7 +72,7 @@ std::vector<CVariant> CSettingUtils::ListToValues(const CSettingList *setting, c
}
bool CSettingUtils::ValuesToList(const CSettingList *setting, const std::vector<CVariant> &values,
- std::vector< boost::shared_ptr<CSetting> > &newValues)
+ std::vector< std::shared_ptr<CSetting> > &newValues)
{
if (setting == NULL)
return false;
diff --git a/xbmc/settings/SettingUtils.h b/xbmc/settings/SettingUtils.h
index 3f2dd55bb1..dba1281d61 100644
--- a/xbmc/settings/SettingUtils.h
+++ b/xbmc/settings/SettingUtils.h
@@ -19,7 +19,7 @@
*
*/
#include <vector>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include "utils/Variant.h"
@@ -45,6 +45,6 @@ public:
*/
static bool SetList(CSettingList *settingList, const std::vector<CVariant> &value);
- static std::vector<CVariant> ListToValues(const CSettingList *setting, const std::vector< boost::shared_ptr<CSetting> > &values);
- static bool ValuesToList(const CSettingList *setting, const std::vector<CVariant> &values, std::vector< boost::shared_ptr<CSetting> > &newValues);
+ static std::vector<CVariant> ListToValues(const CSettingList *setting, const std::vector< std::shared_ptr<CSetting> > &values);
+ static bool ValuesToList(const CSettingList *setting, const std::vector<CVariant> &values, std::vector< std::shared_ptr<CSetting> > &newValues);
};
diff --git a/xbmc/settings/Settings.h b/xbmc/settings/Settings.h
index f0c8b4abd5..936833eed2 100644
--- a/xbmc/settings/Settings.h
+++ b/xbmc/settings/Settings.h
@@ -23,7 +23,7 @@
#include <string>
#include <vector>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include "settings/SettingControl.h"
#include "settings/SettingCreator.h"
diff --git a/xbmc/settings/dialogs/GUIDialogContentSettings.cpp b/xbmc/settings/dialogs/GUIDialogContentSettings.cpp
index 541cba74a4..d6d22f8140 100644
--- a/xbmc/settings/dialogs/GUIDialogContentSettings.cpp
+++ b/xbmc/settings/dialogs/GUIDialogContentSettings.cpp
@@ -115,7 +115,7 @@ bool CGUIDialogContentSettings::OnMessage(CGUIMessage &message)
}
AddonPtr last = m_scraper;
- m_scraper = boost::dynamic_pointer_cast<CScraper>(m_scrapers[m_content][iSelected]);
+ m_scraper = std::dynamic_pointer_cast<CScraper>(m_scrapers[m_content][iSelected]);
m_lastSelected[m_content] = m_scraper;
if (m_scraper != last)
@@ -498,12 +498,12 @@ void CGUIDialogContentSettings::FillScraperList()
int selectedIndex = 0;
if (m_lastSelected.find(m_content) != m_lastSelected.end())
- m_scraper = boost::dynamic_pointer_cast<CScraper>(m_lastSelected[m_content]);
+ m_scraper = std::dynamic_pointer_cast<CScraper>(m_lastSelected[m_content]);
else
{
AddonPtr scraperAddon;
CAddonMgr::Get().GetDefault(ADDON::ScraperTypeFromContent(m_content), scraperAddon);
- m_scraper = boost::dynamic_pointer_cast<CScraper>(scraperAddon);
+ m_scraper = std::dynamic_pointer_cast<CScraper>(scraperAddon);
}
for (IVECADDONS iter = m_scrapers.find(m_content)->second.begin(); iter != m_scrapers.find(m_content)->second.end(); ++iter)
diff --git a/xbmc/settings/dialogs/GUIDialogSettingsBase.h b/xbmc/settings/dialogs/GUIDialogSettingsBase.h
index 024b6cfd66..bac9cecba9 100644
--- a/xbmc/settings/dialogs/GUIDialogSettingsBase.h
+++ b/xbmc/settings/dialogs/GUIDialogSettingsBase.h
@@ -55,7 +55,7 @@ class CSettingAction;
class CSettingCategory;
class CSettingSection;
-typedef boost::shared_ptr<CGUIControlBaseSetting> BaseSettingControlPtr;
+typedef std::shared_ptr<CGUIControlBaseSetting> BaseSettingControlPtr;
class CGUIDialogSettingsBase
: public CGUIDialog,
diff --git a/xbmc/settings/lib/Setting.h b/xbmc/settings/lib/Setting.h
index 7f89295904..c29e53996c 100644
--- a/xbmc/settings/lib/Setting.h
+++ b/xbmc/settings/lib/Setting.h
@@ -24,7 +24,7 @@
#include <string>
#include <vector>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include "ISetting.h"
#include "ISettingCallback.h"
@@ -136,7 +136,7 @@ protected:
CSharedSection m_critical;
};
-typedef boost::shared_ptr<CSetting> SettingPtr;
+typedef std::shared_ptr<CSetting> SettingPtr;
typedef std::vector<CSetting *> SettingList;
typedef std::vector<SettingPtr> SettingPtrList;
diff --git a/xbmc/settings/lib/SettingDependency.cpp b/xbmc/settings/lib/SettingDependency.cpp
index e274e7f947..b9da7d5c25 100644
--- a/xbmc/settings/lib/SettingDependency.cpp
+++ b/xbmc/settings/lib/SettingDependency.cpp
@@ -322,7 +322,7 @@ CSettingDependencyConditionCombinationPtr CSettingDependency::And()
m_operation->SetOperation(BooleanLogicOperationAnd);
- return boost::dynamic_pointer_cast<CSettingDependencyConditionCombination>(m_operation);
+ return std::dynamic_pointer_cast<CSettingDependencyConditionCombination>(m_operation);
}
CSettingDependencyConditionCombinationPtr CSettingDependency::Or()
@@ -332,7 +332,7 @@ CSettingDependencyConditionCombinationPtr CSettingDependency::Or()
m_operation->SetOperation(BooleanLogicOperationOr);
- return boost::dynamic_pointer_cast<CSettingDependencyConditionCombination>(m_operation);
+ return std::dynamic_pointer_cast<CSettingDependencyConditionCombination>(m_operation);
}
bool CSettingDependency::setType(const std::string &type)
diff --git a/xbmc/settings/lib/SettingDependency.h b/xbmc/settings/lib/SettingDependency.h
index 5f0d997b33..0cb551eee2 100644
--- a/xbmc/settings/lib/SettingDependency.h
+++ b/xbmc/settings/lib/SettingDependency.h
@@ -73,10 +73,10 @@ private:
SettingDependencyOperator m_operator;
};
-typedef boost::shared_ptr<CSettingDependencyCondition> CSettingDependencyConditionPtr;
+typedef std::shared_ptr<CSettingDependencyCondition> CSettingDependencyConditionPtr;
class CSettingDependencyConditionCombination;
-typedef boost::shared_ptr<CSettingDependencyConditionCombination> CSettingDependencyConditionCombinationPtr;
+typedef std::shared_ptr<CSettingDependencyConditionCombination> CSettingDependencyConditionCombinationPtr;
class CSettingDependencyConditionCombination : public CSettingConditionCombination
{
diff --git a/xbmc/settings/lib/SettingsManager.cpp b/xbmc/settings/lib/SettingsManager.cpp
index 40342b0a70..655e0809f6 100644
--- a/xbmc/settings/lib/SettingsManager.cpp
+++ b/xbmc/settings/lib/SettingsManager.cpp
@@ -26,6 +26,7 @@
#include "utils/StringUtils.h"
#include "utils/XBMCTinyXML.h"
+#include <algorithm>
CSettingsManager::CSettingsManager()
: m_initialized(false), m_loaded(false)
@@ -607,17 +608,17 @@ bool CSettingsManager::SetString(const std::string &id, const std::string &value
return ((CSettingString*)setting)->SetValue(value);
}
-std::vector< boost::shared_ptr<CSetting> > CSettingsManager::GetList(const std::string &id) const
+std::vector< std::shared_ptr<CSetting> > CSettingsManager::GetList(const std::string &id) const
{
CSharedLock lock(m_settingsCritical);
CSetting *setting = GetSetting(id);
if (setting == NULL || setting->GetType() != SettingTypeList)
- return std::vector< boost::shared_ptr<CSetting> >();
+ return std::vector< std::shared_ptr<CSetting> >();
return ((CSettingList*)setting)->GetValue();
}
-bool CSettingsManager::SetList(const std::string &id, const std::vector< boost::shared_ptr<CSetting> > &value)
+bool CSettingsManager::SetList(const std::string &id, const std::vector< std::shared_ptr<CSetting> > &value)
{
CSharedLock lock(m_settingsCritical);
CSetting *setting = GetSetting(id);
diff --git a/xbmc/settings/lib/SettingsManager.h b/xbmc/settings/lib/SettingsManager.h
index b2db46fbd7..ca895e95e7 100644
--- a/xbmc/settings/lib/SettingsManager.h
+++ b/xbmc/settings/lib/SettingsManager.h
@@ -318,7 +318,7 @@ public:
\param id Setting identifier
\return List of values of the setting with the given identifier
*/
- std::vector< boost::shared_ptr<CSetting> > GetList(const std::string &id) const;
+ std::vector< std::shared_ptr<CSetting> > GetList(const std::string &id) const;
/*!
\brief Sets the boolean value of the setting with the given identifier.
@@ -366,7 +366,7 @@ public:
\param value Values to set
\return True if setting the values was successful, false otherwise
*/
- bool SetList(const std::string &id, const std::vector< boost::shared_ptr<CSetting> > &value);
+ bool SetList(const std::string &id, const std::vector< std::shared_ptr<CSetting> > &value);
/*!
\brief Gets the setting conditions manager used by the settings manager.
diff --git a/xbmc/storage/DetectDVDType.h b/xbmc/storage/DetectDVDType.h
index b1cfd9aa08..03446f9b5d 100644
--- a/xbmc/storage/DetectDVDType.h
+++ b/xbmc/storage/DetectDVDType.h
@@ -35,7 +35,7 @@
#include "threads/CriticalSection.h"
#include "threads/Thread.h"
-#include "boost/shared_ptr.hpp"
+#include <memory>
#include <string>
namespace MEDIA_DETECT
@@ -89,7 +89,7 @@ private:
static std::string m_diskLabel;
static std::string m_diskPath;
- boost::shared_ptr<CLibcdio> m_cdio;
+ std::shared_ptr<CLibcdio> m_cdio;
};
}
#endif
diff --git a/xbmc/storage/MediaManager.cpp b/xbmc/storage/MediaManager.cpp
index 75f27247e8..bfcb17eccb 100644
--- a/xbmc/storage/MediaManager.cpp
+++ b/xbmc/storage/MediaManager.cpp
@@ -593,7 +593,7 @@ void CMediaManager::EjectTray( const bool bEject, const char cDriveLetter )
#ifdef TARGET_WINDOWS
CWIN32Util::EjectTray(cDriveLetter);
#else
- boost::shared_ptr<CLibcdio> c_cdio = CLibcdio::GetInstance();
+ std::shared_ptr<CLibcdio> c_cdio = CLibcdio::GetInstance();
char* dvdDevice = c_cdio->GetDeviceFileName();
m_isoReader.Reset();
int nRetries=3;
diff --git a/xbmc/storage/android/AndroidStorageProvider.cpp b/xbmc/storage/android/AndroidStorageProvider.cpp
index 076d7d2ae4..0cd4b42f60 100644
--- a/xbmc/storage/android/AndroidStorageProvider.cpp
+++ b/xbmc/storage/android/AndroidStorageProvider.cpp
@@ -18,6 +18,11 @@
*
*/
+#include <cstdlib>
+#include <cstdio>
+#include <cstring>
+#include <map>
+
#include "AndroidStorageProvider.h"
#include "android/activity/XBMCApp.h"
#include "guilib/LocalizeStrings.h"
@@ -28,10 +33,6 @@
#include "utils/RegExp.h"
#include "utils/StringUtils.h"
#include "utils/URIUtils.h"
-#include <cstdio>
-#include <cstring>
-#include <cstdlib>
-#include <map>
CAndroidStorageProvider::CAndroidStorageProvider()
{
diff --git a/xbmc/storage/cdioSupport.cpp b/xbmc/storage/cdioSupport.cpp
index 366ed9cc36..521262de76 100644
--- a/xbmc/storage/cdioSupport.cpp
+++ b/xbmc/storage/cdioSupport.cpp
@@ -37,7 +37,7 @@
using namespace MEDIA_DETECT;
-boost::shared_ptr<CLibcdio> CLibcdio::m_pInstance;
+std::shared_ptr<CLibcdio> CLibcdio::m_pInstance;
/* Some interesting sector numbers stored in the above buffer. */
#define ISO_SUPERBLOCK_SECTOR 16 /* buffer[0] */
@@ -118,11 +118,11 @@ void CLibcdio::ReleaseInstance()
m_pInstance.reset();
}
-boost::shared_ptr<CLibcdio> CLibcdio::GetInstance()
+std::shared_ptr<CLibcdio> CLibcdio::GetInstance()
{
if (!m_pInstance)
{
- m_pInstance = boost::shared_ptr<CLibcdio>(new CLibcdio());
+ m_pInstance = std::shared_ptr<CLibcdio>(new CLibcdio());
}
return m_pInstance;
}
diff --git a/xbmc/storage/cdioSupport.h b/xbmc/storage/cdioSupport.h
index f5f6823dea..e6cde6a32c 100644
--- a/xbmc/storage/cdioSupport.h
+++ b/xbmc/storage/cdioSupport.h
@@ -36,7 +36,7 @@
#include <cdio/cdio.h>
#include "threads/CriticalSection.h"
-#include "boost/shared_ptr.hpp"
+#include <memory>
#include <map>
#include <string>
@@ -259,7 +259,7 @@ public:
virtual ~CLibcdio();
static void ReleaseInstance();
- static boost::shared_ptr<CLibcdio> GetInstance();
+ static std::shared_ptr<CLibcdio> GetInstance();
// libcdio is not thread safe so these are wrappers to libcdio routines
CdIo_t* cdio_open(const char *psz_source, driver_id_t driver_id);
@@ -278,7 +278,7 @@ public:
private:
char* s_defaultDevice;
CCriticalSection m_critSection;
- static boost::shared_ptr<CLibcdio> m_pInstance;
+ static std::shared_ptr<CLibcdio> m_pInstance;
};
class CCdIoSupport
@@ -341,7 +341,7 @@ private:
int m_nFirstAudio; /* # of first audio track */
int m_nNumAudio; /* # of audio tracks */
- boost::shared_ptr<CLibcdio> m_cdio;
+ std::shared_ptr<CLibcdio> m_cdio;
};
}
diff --git a/xbmc/utils/Archive.cpp b/xbmc/utils/Archive.cpp
index 14cd61c404..62fe7874ea 100644
--- a/xbmc/utils/Archive.cpp
+++ b/xbmc/utils/Archive.cpp
@@ -18,6 +18,7 @@
*
*/
+#include <algorithm>
#include <cstring>
#include "Archive.h"
#include "IArchivable.h"
diff --git a/xbmc/utils/BooleanLogic.h b/xbmc/utils/BooleanLogic.h
index e1af268996..9b9bd1604b 100644
--- a/xbmc/utils/BooleanLogic.h
+++ b/xbmc/utils/BooleanLogic.h
@@ -22,7 +22,7 @@
#include <string>
#include <vector>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include "utils/IXmlDeserializable.h"
@@ -53,11 +53,11 @@ protected:
bool m_negated;
};
-typedef boost::shared_ptr<CBooleanLogicValue> CBooleanLogicValuePtr;
+typedef std::shared_ptr<CBooleanLogicValue> CBooleanLogicValuePtr;
typedef std::vector<CBooleanLogicValuePtr> CBooleanLogicValues;
class CBooleanLogicOperation;
-typedef boost::shared_ptr<CBooleanLogicOperation> CBooleanLogicOperationPtr;
+typedef std::shared_ptr<CBooleanLogicOperation> CBooleanLogicOperationPtr;
typedef std::vector<CBooleanLogicOperationPtr> CBooleanLogicOperations;
class CBooleanLogicOperation : public IXmlDeserializable
diff --git a/xbmc/utils/CPUInfo.cpp b/xbmc/utils/CPUInfo.cpp
index 95ddad9977..5f5bf80d66 100644
--- a/xbmc/utils/CPUInfo.cpp
+++ b/xbmc/utils/CPUInfo.cpp
@@ -18,6 +18,8 @@
*
*/
+#include <cstdlib>
+
#include "CPUInfo.h"
#include "Temperature.h"
#include <string>
diff --git a/xbmc/utils/CharsetConverter.cpp b/xbmc/utils/CharsetConverter.cpp
index 23bf0822f0..b1b257778b 100644
--- a/xbmc/utils/CharsetConverter.cpp
+++ b/xbmc/utils/CharsetConverter.cpp
@@ -32,6 +32,7 @@
#include <errno.h>
#include <iconv.h>
+#include <algorithm>
#if !defined(TARGET_WINDOWS) && defined(HAVE_CONFIG_H)
#include "config.h"
diff --git a/xbmc/utils/Fanart.cpp b/xbmc/utils/Fanart.cpp
index 9a86bd052a..c9aacdba4c 100644
--- a/xbmc/utils/Fanart.cpp
+++ b/xbmc/utils/Fanart.cpp
@@ -18,6 +18,9 @@
*
*/
+#include <algorithm>
+#include <functional>
+
#include "Fanart.h"
#include "utils/XBMCTinyXML.h"
#include "utils/XMLUtils.h"
diff --git a/xbmc/utils/GlobalsHandling.h b/xbmc/utils/GlobalsHandling.h
index c27f76eb46..ab46c58538 100644
--- a/xbmc/utils/GlobalsHandling.h
+++ b/xbmc/utils/GlobalsHandling.h
@@ -20,7 +20,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
/**
* This file contains the pattern for moving "globals" from the BSS Segment to the heap.
@@ -46,7 +46,7 @@
*
* The (at least) two ways to do this:
*
- * 1) You can use the reference object boost::shared_ptr to access the global variable.
+ * 1) You can use the reference object std::shared_ptr to access the global variable.
*
* This would be the preferred means since it is (very slightly) more efficent than
* the alternative. To use this pattern you replace standard static references to
@@ -54,11 +54,11 @@
* do this for you can put the following code in the header file where the global's
* class is declared:
*
- * static boost::shared_ptr<GlobalVariableClass> g_globalVariableRef(xbmcutil::GlobalsSingleton<GlobalVariableClass>::getInstance());
+ * static std::shared_ptr<GlobalVariableClass> g_globalVariableRef(xbmcutil::GlobalsSingleton<GlobalVariableClass>::getInstance());
* #define g_globalVariable (*(g_globalVariableRef.get()))
*
* Note what this does. In every file that includes this header there will be a *static*
- * instance of the boost::shared_ptr<GlobalVariableClass> smart pointer. This effectively
+ * instance of the std::shared_ptr<GlobalVariableClass> smart pointer. This effectively
* reference counts the singleton from every compilation unit (ie, object code file that
* results from a compilation of a .c/.cpp file) that references this global directly.
*
@@ -139,7 +139,7 @@ namespace xbmcutil
* Deleter class above so that when the bss segment that this static is
* sitting in is deinitialized, the shared_ptr pointer will be cleaned up.
*/
- static Deleter<boost::shared_ptr<T> > instance;
+ static Deleter<std::shared_ptr<T> > instance;
/**
* See 'getQuick' below.
@@ -151,13 +151,13 @@ namespace xbmcutil
* Retrieve an instance of the singleton using a shared pointer for
* referenece counting.
*/
- inline static boost::shared_ptr<T> getInstance()
+ inline static std::shared_ptr<T> getInstance()
{
if (!instance.guarded)
{
if (!quick)
quick = new T;
- instance.guarded = new boost::shared_ptr<T>(quick);
+ instance.guarded = new std::shared_ptr<T>(quick);
}
return *(instance.guarded);
}
@@ -179,7 +179,7 @@ namespace xbmcutil
};
- template <class T> typename GlobalsSingleton<T>::template Deleter<boost::shared_ptr<T> > GlobalsSingleton<T>::instance;
+ template <class T> typename GlobalsSingleton<T>::template Deleter<std::shared_ptr<T> > GlobalsSingleton<T>::instance;
template <class T> T* GlobalsSingleton<T>::quick;
/**
@@ -203,7 +203,7 @@ namespace xbmcutil
*
*/
#define XBMC_GLOBAL_REF(classname,g_variable) \
- static boost::shared_ptr<classname> g_variable##Ref(xbmcutil::GlobalsSingleton<classname>::getInstance())
+ static std::shared_ptr<classname> g_variable##Ref(xbmcutil::GlobalsSingleton<classname>::getInstance())
/**
* This declares the actual use of the variable. It needs to be used in another #define
diff --git a/xbmc/utils/HttpRangeUtils.cpp b/xbmc/utils/HttpRangeUtils.cpp
index 2df8d9f2b7..e09111e860 100644
--- a/xbmc/utils/HttpRangeUtils.cpp
+++ b/xbmc/utils/HttpRangeUtils.cpp
@@ -23,6 +23,8 @@
#include "network/httprequesthandler/IHTTPRequestHandler.h"
#include "utils/Variant.h"
+#include <algorithm>
+
#define HEADER_NEWLINE "\r\n"
#define HEADER_SEPARATOR HEADER_NEWLINE HEADER_NEWLINE
#define HEADER_BOUNDARY "--"
diff --git a/xbmc/utils/JobManager.cpp b/xbmc/utils/JobManager.cpp
index d2d2a13f7b..8f690fe636 100644
--- a/xbmc/utils/JobManager.cpp
+++ b/xbmc/utils/JobManager.cpp
@@ -20,13 +20,13 @@
#include "JobManager.h"
#include <algorithm>
+#include <functional>
#include <stdexcept>
#include "threads/SingleLock.h"
#include "utils/log.h"
#include "system.h"
-
using namespace std;
bool CJob::ShouldCancel(unsigned int progress, unsigned int total) const
diff --git a/xbmc/utils/LabelFormatter.cpp b/xbmc/utils/LabelFormatter.cpp
index 163fe9de3a..39b471989f 100644
--- a/xbmc/utils/LabelFormatter.cpp
+++ b/xbmc/utils/LabelFormatter.cpp
@@ -18,6 +18,8 @@
*
*/
+#include <cstdlib>
+
#include "LabelFormatter.h"
#include "settings/AdvancedSettings.h"
#include "settings/Settings.h"
@@ -31,6 +33,8 @@
#include "URIUtils.h"
#include "guilib/LocalizeStrings.h"
+#include <cassert>
+
using namespace MUSIC_INFO;
/* LabelFormatter
diff --git a/xbmc/utils/Observer.cpp b/xbmc/utils/Observer.cpp
index 9d3ef14a99..f46bdbcb4a 100644
--- a/xbmc/utils/Observer.cpp
+++ b/xbmc/utils/Observer.cpp
@@ -23,6 +23,8 @@
#include "threads/SingleLock.h"
#include "utils/JobManager.h"
+#include <algorithm>
+
using namespace std;
Observer::~Observer(void)
diff --git a/xbmc/utils/SortUtils.cpp b/xbmc/utils/SortUtils.cpp
index 3d1f347e3c..9d364c44ba 100644
--- a/xbmc/utils/SortUtils.cpp
+++ b/xbmc/utils/SortUtils.cpp
@@ -27,6 +27,8 @@
#include "utils/StringUtils.h"
#include "utils/Variant.h"
+#include <algorithm>
+
using namespace std;
string ArrayToString(SortAttribute attributes, const CVariant &variant, const string &seperator = " / ")
diff --git a/xbmc/utils/SortUtils.h b/xbmc/utils/SortUtils.h
index 5eda3c6fad..0873e1ef76 100644
--- a/xbmc/utils/SortUtils.h
+++ b/xbmc/utils/SortUtils.h
@@ -21,7 +21,7 @@
#include <map>
#include <string>
-#include "boost/shared_ptr.hpp"
+#include <memory>
#include "DatabaseUtils.h"
#include "SortFileItem.h"
@@ -116,7 +116,7 @@ typedef struct GUIViewSortDetails
} GUIViewSortDetails;
typedef DatabaseResult SortItem;
-typedef boost::shared_ptr<SortItem> SortItemPtr;
+typedef std::shared_ptr<SortItem> SortItemPtr;
typedef std::vector<SortItemPtr> SortItems;
class SortUtils
diff --git a/xbmc/utils/StringUtils.cpp b/xbmc/utils/StringUtils.cpp
index 6d0f19ca75..5963bf3d1f 100644
--- a/xbmc/utils/StringUtils.cpp
+++ b/xbmc/utils/StringUtils.cpp
@@ -33,6 +33,7 @@
#include "utils/fstrcmp.h"
#include "Util.h"
#include <locale>
+#include <functional>
#include <assert.h>
#include <math.h>
diff --git a/xbmc/utils/URIUtils.cpp b/xbmc/utils/URIUtils.cpp
index 5caa91ef5b..bb3f95ca15 100644
--- a/xbmc/utils/URIUtils.cpp
+++ b/xbmc/utils/URIUtils.cpp
@@ -32,6 +32,7 @@
#include "URL.h"
#include "StringUtils.h"
+#include <cassert>
#include <netinet/in.h>
#include <arpa/inet.h>
diff --git a/xbmc/utils/test/TestGlobalsHandling.cpp b/xbmc/utils/test/TestGlobalsHandling.cpp
index fc00763fd2..50afc86ba1 100644
--- a/xbmc/utils/test/TestGlobalsHandling.cpp
+++ b/xbmc/utils/test/TestGlobalsHandling.cpp
@@ -32,6 +32,6 @@ TEST(TestGlobal, Pattern1)
{
EXPECT_TRUE(TestGlobalPattern1::ctorCalled);
{
- boost::shared_ptr<TestGlobalPattern1> ptr = g_testGlobalPattern1Ref;
+ std::shared_ptr<TestGlobalPattern1> ptr = g_testGlobalPattern1Ref;
}
}
diff --git a/xbmc/video/VideoDatabase.cpp b/xbmc/video/VideoDatabase.cpp
index 0a7816a1be..e5b478aef5 100644
--- a/xbmc/video/VideoDatabase.cpp
+++ b/xbmc/video/VideoDatabase.cpp
@@ -6749,7 +6749,7 @@ ScraperPtr CVideoDatabase::GetScraperForPath(const std::string& strPath, SScanSe
if (!scraperID.empty() &&
CAddonMgr::Get().GetAddon(scraperID, addon))
{
- scraper = boost::dynamic_pointer_cast<CScraper>(addon->Clone());
+ scraper = std::dynamic_pointer_cast<CScraper>(addon->Clone());
if (!scraper)
return ScraperPtr();
@@ -6792,7 +6792,7 @@ ScraperPtr CVideoDatabase::GetScraperForPath(const std::string& strPath, SScanSe
if (content != CONTENT_NONE &&
CAddonMgr::Get().GetAddon(m_pDS->fv("path.strScraper").get_asString(), addon))
{
- scraper = boost::dynamic_pointer_cast<CScraper>(addon->Clone());
+ scraper = std::dynamic_pointer_cast<CScraper>(addon->Clone());
scraper->SetPathSettings(content, m_pDS->fv("path.strSettings").get_asString());
settings.parent_name = m_pDS->fv("path.useFolderNames").get_asBool();
settings.recurse = m_pDS->fv("path.scanRecursive").get_asInt();
@@ -8949,7 +8949,7 @@ void CVideoDatabase::ImportFromXML(const std::string &path)
if (CAddonMgr::Get().GetAddon(id, addon))
{
SScanSettings settings;
- ScraperPtr scraper = boost::dynamic_pointer_cast<CScraper>(addon);
+ ScraperPtr scraper = std::dynamic_pointer_cast<CScraper>(addon);
// FIXME: scraper settings are not exported?
scraper->SetPathSettings(TranslateContent(content), "");
XMLUtils::GetInt(path,"scanrecursive",settings.recurse);
diff --git a/xbmc/video/VideoInfoTag.cpp b/xbmc/video/VideoInfoTag.cpp
index ad85cdda4d..6c87f3e980 100644
--- a/xbmc/video/VideoInfoTag.cpp
+++ b/xbmc/video/VideoInfoTag.cpp
@@ -30,6 +30,7 @@
#include "filesystem/File.h"
#include <sstream>
+#include <algorithm>
using namespace std;
diff --git a/xbmc/video/VideoThumbLoader.cpp b/xbmc/video/VideoThumbLoader.cpp
index f517366cfa..583d9d015f 100644
--- a/xbmc/video/VideoThumbLoader.cpp
+++ b/xbmc/video/VideoThumbLoader.cpp
@@ -18,6 +18,8 @@
*
*/
+#include <cstdlib>
+
#include "VideoThumbLoader.h"
#include "filesystem/StackDirectory.h"
#include "utils/URIUtils.h"
diff --git a/xbmc/video/dialogs/GUIDialogVideoInfo.cpp b/xbmc/video/dialogs/GUIDialogVideoInfo.cpp
index 433bd1d4fe..79b9af51e5 100644
--- a/xbmc/video/dialogs/GUIDialogVideoInfo.cpp
+++ b/xbmc/video/dialogs/GUIDialogVideoInfo.cpp
@@ -186,7 +186,7 @@ bool CGUIDialogVideoInfo::OnMessage(CGUIMessage& message)
{
if (IsActive() && message.GetParam1() == GUI_MSG_UPDATE_ITEM && message.GetItem())
{
- CFileItemPtr item = boost::static_pointer_cast<CFileItem>(message.GetItem());
+ CFileItemPtr item = std::static_pointer_cast<CFileItem>(message.GetItem());
if (item && m_movieItem->IsPath(item->GetPath()))
{ // Just copy over the stream details and the thumb if we don't already have one
if (!m_movieItem->HasArt("thumb"))
diff --git a/xbmc/view/GUIViewState.cpp b/xbmc/view/GUIViewState.cpp
index 78378dd92e..0b61778748 100644
--- a/xbmc/view/GUIViewState.cpp
+++ b/xbmc/view/GUIViewState.cpp
@@ -557,7 +557,7 @@ CGUIViewStateFromItems::CGUIViewStateFromItems(const CFileItemList &items) : CGU
AddonPtr addon;
if (CAddonMgr::Get().GetAddon(url.GetHostName(),addon) && addon)
{
- PluginPtr plugin = boost::static_pointer_cast<CPluginSource>(addon);
+ PluginPtr plugin = std::static_pointer_cast<CPluginSource>(addon);
if (plugin->Provides(CPluginSource::AUDIO))
m_playlist = PLAYLIST_MUSIC;
if (plugin->Provides(CPluginSource::VIDEO))
diff --git a/xbmc/win32/pch.h b/xbmc/win32/pch.h
index 5ab70b51aa..d853096b6f 100644
--- a/xbmc/win32/pch.h
+++ b/xbmc/win32/pch.h
@@ -41,7 +41,7 @@
#else
#include <d3d9types.h>
#endif
-#include "boost/shared_ptr.hpp"
+#include <memory>
// anything below here should be headers that very rarely (hopefully never)
// change yet are included almost everywhere.
/* empty */
diff --git a/xbmc/windowing/android/WinEventsAndroid.cpp b/xbmc/windowing/android/WinEventsAndroid.cpp
index cce9b0df3c..b6402434e8 100644
--- a/xbmc/windowing/android/WinEventsAndroid.cpp
+++ b/xbmc/windowing/android/WinEventsAndroid.cpp
@@ -58,7 +58,7 @@ static bool different_event(XBMC_Event &curEvent, XBMC_Event &newEvent)
return true;
// different axis direction (handles -1 vs 1)
- if (signbit(curEvent.jaxis.fvalue) != signbit(newEvent.jaxis.fvalue))
+ if (std::signbit(curEvent.jaxis.fvalue) != std::signbit(newEvent.jaxis.fvalue))
return true;
// different axis value (handles 0 vs 1 or -1)
diff --git a/xbmc/windowing/egl/EGLNativeTypeIMX.cpp b/xbmc/windowing/egl/EGLNativeTypeIMX.cpp
index 061f6e60e7..111406cce1 100644
--- a/xbmc/windowing/egl/EGLNativeTypeIMX.cpp
+++ b/xbmc/windowing/egl/EGLNativeTypeIMX.cpp
@@ -18,6 +18,8 @@
*
*/
+#include <cstdlib>
+
#include "system.h"
#include <EGL/egl.h>
diff --git a/xbmc/windows/GUIMediaWindow.cpp b/xbmc/windows/GUIMediaWindow.cpp
index 6e909f2fcd..4ad8cc2d85 100644
--- a/xbmc/windows/GUIMediaWindow.cpp
+++ b/xbmc/windows/GUIMediaWindow.cpp
@@ -385,7 +385,7 @@ bool CGUIMediaWindow::OnMessage(CGUIMessage& message)
}
else if (message.GetParam1()==GUI_MSG_UPDATE_ITEM && message.GetItem())
{
- CFileItemPtr newItem = boost::static_pointer_cast<CFileItem>(message.GetItem());
+ CFileItemPtr newItem = std::static_pointer_cast<CFileItem>(message.GetItem());
if (IsActive())
{
if (m_vecItems->UpdateItem(newItem.get()) && message.GetParam2() == 1)
@@ -1034,7 +1034,7 @@ bool CGUIMediaWindow::OnClick(int iItem)
AddonPtr addon;
if (CAddonMgr::Get().GetAddon(url.GetHostName(),addon))
{
- PluginPtr plugin = boost::dynamic_pointer_cast<CPluginSource>(addon);
+ PluginPtr plugin = std::dynamic_pointer_cast<CPluginSource>(addon);
if (plugin && plugin->Provides(CPluginSource::AUDIO))
{
CFileItemList items;
diff --git a/xbmc/windows/GUIWindowScreensaver.cpp b/xbmc/windows/GUIWindowScreensaver.cpp
index 0aa4418fa1..9d4778321d 100644
--- a/xbmc/windows/GUIWindowScreensaver.cpp
+++ b/xbmc/windows/GUIWindowScreensaver.cpp
@@ -142,7 +142,7 @@ bool CGUIWindowScreensaver::OnMessage(CGUIMessage& message)
if (!CAddonMgr::Get().GetAddon(CSettings::Get().GetString("screensaver.mode"), addon, ADDON_SCREENSAVER))
return false;
- m_addon = boost::dynamic_pointer_cast<CScreenSaver>(addon);
+ m_addon = std::dynamic_pointer_cast<CScreenSaver>(addon);
if (!m_addon)
return false;
diff --git a/xbmc/windows/GUIWindowScreensaver.h b/xbmc/windows/GUIWindowScreensaver.h
index af2cb3cd1c..128527d050 100644
--- a/xbmc/windows/GUIWindowScreensaver.h
+++ b/xbmc/windows/GUIWindowScreensaver.h
@@ -49,6 +49,6 @@ private:
bool m_bInitialized;
CCriticalSection m_critSection;
#ifdef HAS_SCREENSAVER
- boost::shared_ptr<ADDON::CScreenSaver> m_addon;
+ std::shared_ptr<ADDON::CScreenSaver> m_addon;
#endif
};