From e0ff68b3f69029ab38a56c96548277a99cbe7452 Mon Sep 17 00:00:00 2001 From: Florent Castelli Date: Wed, 12 Oct 2016 11:32:24 +0200 Subject: [PATCH] c++11: Remove compat header base/functional.h We want a proper C++11, not tr1. We don't target those compilers anyway. --- CMakeLists.txt | 1 - Common/ChunkFile.h | 10 ------- Core/Config.cpp | 4 +-- Core/HLE/sceSas.cpp | 3 +- Core/SaveState.h | 2 +- GPU/Common/TextureScalerCommon.cpp | 24 +++++++-------- GPU/Debugger/Stepping.h | 3 +- GPU/Directx9/TextureScalerDX9.cpp | 8 ++--- GPU/GLES/TextureScaler.cpp | 6 ++-- GPU/Vulkan/TextureScalerVulkan.cpp | 6 ++-- UI/ControlMappingScreen.cpp | 6 ++-- UI/ControlMappingScreen.h | 3 +- UI/CwCheatScreen.h | 3 +- UI/DevScreens.h | 4 +-- UI/GameScreen.cpp | 6 ++-- UI/GameScreen.h | 3 +- UI/GameSettingsScreen.cpp | 6 ++-- UI/InstallZipScreen.h | 3 +- UI/MainScreen.h | 3 +- UI/MiscScreens.cpp | 2 +- UI/MiscScreens.h | 4 +-- UI/PauseScreen.cpp | 2 +- UI/PauseScreen.h | 3 +- UI/RemoteISOScreen.h | 3 +- UI/ReportScreen.h | 3 +- UI/SavedataScreen.h | 2 +- UI/Store.cpp | 5 ++-- UI/Store.h | 3 +- UI/TiltAnalogSettingsScreen.h | 3 +- UI/TouchControlLayoutScreen.h | 5 ++-- Windows/GEDebugger/GEDebugger.cpp | 6 ++-- Windows/GEDebugger/SimpleGLWindow.h | 5 ++-- Windows/W32Util/ShellUtil.cpp | 5 ++-- ext/native/base/functional.h | 35 ---------------------- ext/native/native.vcxproj | 1 - ext/native/native.vcxproj.filters | 3 -- ext/native/net/http_client.h | 3 +- ext/native/net/http_server.cpp | 7 +++-- ext/native/net/http_server.h | 2 +- ext/native/thread/executor.cpp | 3 +- ext/native/thread/executor.h | 2 +- ext/native/thread/prioritizedworkqueue.cpp | 3 +- ext/native/thread/threadpool.h | 5 +++- ext/native/ui/ui_screen.cpp | 2 +- ext/native/ui/view.h | 10 +++---- ext/native/ui/viewgroup.cpp | 4 +-- 46 files changed, 104 insertions(+), 131 deletions(-) delete mode 100644 ext/native/base/functional.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 004024c4f..29df1fdb0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -896,7 +896,6 @@ add_library(native STATIC ext/native/base/colorutil.h ext/native/base/display.cpp ext/native/base/display.h - ext/native/base/functional.h ext/native/base/linked_ptr.h ext/native/base/logging.h ext/native/base/mutex.h diff --git a/Common/ChunkFile.h b/Common/ChunkFile.h index c3880e9f0..5f47a4a3d 100644 --- a/Common/ChunkFile.h +++ b/Common/ChunkFile.h @@ -32,11 +32,7 @@ #include #include #include -#if defined(MACGNUSTD) -#include -#else #include -#endif #include "Common.h" #include "FileUtil.h" @@ -46,12 +42,6 @@ #include "../ext/snappy/snappy-c.h" #endif -#if defined(MACGNUSTD) -namespace std { - using tr1::is_pointer; -} -#endif - template struct LinkedListItem : public T { diff --git a/Core/Config.cpp b/Core/Config.cpp index c354c2faa..58ee7a14f 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -15,12 +15,12 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. +#include #include #include -#include +#include #include "base/display.h" -#include "base/functional.h" #include "base/NativeApp.h" #include "ext/vjson/json.h" #include "file/ini_file.h" diff --git a/Core/HLE/sceSas.cpp b/Core/HLE/sceSas.cpp index 3dd69b5b9..fae7e7307 100644 --- a/Core/HLE/sceSas.cpp +++ b/Core/HLE/sceSas.cpp @@ -27,8 +27,9 @@ // https://github.com/hrydgard/ppsspp/issues/1078 #include +#include + #include "base/basictypes.h" -#include "base/functional.h" #include "base/mutex.h" #include "profiler/profiler.h" #include "thread/thread.h" diff --git a/Core/SaveState.h b/Core/SaveState.h index 2c2d5cf91..a4719103a 100644 --- a/Core/SaveState.h +++ b/Core/SaveState.h @@ -15,10 +15,10 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. +#include #include #include -#include "base/functional.h" #include "Common/ChunkFile.h" namespace SaveState diff --git a/GPU/Common/TextureScalerCommon.cpp b/GPU/Common/TextureScalerCommon.cpp index 6d50a844f..14d93de15 100644 --- a/GPU/Common/TextureScalerCommon.cpp +++ b/GPU/Common/TextureScalerCommon.cpp @@ -607,22 +607,22 @@ bool TextureScaler::Scale(u32* &data, u32 &dstFmt, int &width, int &height, int void TextureScaler::ScaleXBRZ(int factor, u32* source, u32* dest, int width, int height) { xbrz::ScalerCfg cfg; - GlobalThreadPool::Loop(std::bind(&xbrz::scale, factor, source, dest, width, height, xbrz::ColorFormat::ARGB, cfg, placeholder::_1, placeholder::_2), 0, height); + GlobalThreadPool::Loop(std::bind(&xbrz::scale, factor, source, dest, width, height, xbrz::ColorFormat::ARGB, cfg, std::placeholders::_1, std::placeholders::_2), 0, height); } void TextureScaler::ScaleBilinear(int factor, u32* source, u32* dest, int width, int height) { bufTmp1.resize(width*height*factor); u32 *tmpBuf = bufTmp1.data(); - GlobalThreadPool::Loop(std::bind(&bilinearH, factor, source, tmpBuf, width, placeholder::_1, placeholder::_2), 0, height); - GlobalThreadPool::Loop(std::bind(&bilinearV, factor, tmpBuf, dest, width, 0, height, placeholder::_1, placeholder::_2), 0, height); + GlobalThreadPool::Loop(std::bind(&bilinearH, factor, source, tmpBuf, width, std::placeholders::_1, std::placeholders::_2), 0, height); + GlobalThreadPool::Loop(std::bind(&bilinearV, factor, tmpBuf, dest, width, 0, height, std::placeholders::_1, std::placeholders::_2), 0, height); } void TextureScaler::ScaleBicubicBSpline(int factor, u32* source, u32* dest, int width, int height) { - GlobalThreadPool::Loop(std::bind(&scaleBicubicBSpline, factor, source, dest, width, height, placeholder::_1, placeholder::_2), 0, height); + GlobalThreadPool::Loop(std::bind(&scaleBicubicBSpline, factor, source, dest, width, height, std::placeholders::_1, std::placeholders::_2), 0, height); } void TextureScaler::ScaleBicubicMitchell(int factor, u32* source, u32* dest, int width, int height) { - GlobalThreadPool::Loop(std::bind(&scaleBicubicMitchell, factor, source, dest, width, height, placeholder::_1, placeholder::_2), 0, height); + GlobalThreadPool::Loop(std::bind(&scaleBicubicMitchell, factor, source, dest, width, height, std::placeholders::_1, std::placeholders::_2), 0, height); } void TextureScaler::ScaleHybrid(int factor, u32* source, u32* dest, int width, int height, bool bicubic) { @@ -638,8 +638,8 @@ void TextureScaler::ScaleHybrid(int factor, u32* source, u32* dest, int width, i bufTmp1.resize(width*height); bufTmp2.resize(width*height*factor*factor); bufTmp3.resize(width*height*factor*factor); - GlobalThreadPool::Loop(std::bind(&generateDistanceMask, source, bufTmp1.data(), width, height, placeholder::_1, placeholder::_2), 0, height); - GlobalThreadPool::Loop(std::bind(&convolve3x3, bufTmp1.data(), bufTmp2.data(), KERNEL_SPLAT, width, height, placeholder::_1, placeholder::_2), 0, height); + GlobalThreadPool::Loop(std::bind(&generateDistanceMask, source, bufTmp1.data(), width, height, std::placeholders::_1, std::placeholders::_2), 0, height); + GlobalThreadPool::Loop(std::bind(&convolve3x3, bufTmp1.data(), bufTmp2.data(), KERNEL_SPLAT, width, height, std::placeholders::_1, std::placeholders::_2), 0, height); ScaleBilinear(factor, bufTmp2.data(), bufTmp3.data(), width, height); // mask C is now in bufTmp3 @@ -652,13 +652,13 @@ void TextureScaler::ScaleHybrid(int factor, u32* source, u32* dest, int width, i // Now we can mix it all together // The factor 8192 was found through practical testing on a variety of textures - GlobalThreadPool::Loop(std::bind(&mix, dest, bufTmp2.data(), bufTmp3.data(), 8192, width*factor, placeholder::_1, placeholder::_2), 0, height*factor); + GlobalThreadPool::Loop(std::bind(&mix, dest, bufTmp2.data(), bufTmp3.data(), 8192, width*factor, std::placeholders::_1, std::placeholders::_2), 0, height*factor); } void TextureScaler::DePosterize(u32* source, u32* dest, int width, int height) { bufTmp3.resize(width*height); - GlobalThreadPool::Loop(std::bind(&deposterizeH, source, bufTmp3.data(), width, placeholder::_1, placeholder::_2), 0, height); - GlobalThreadPool::Loop(std::bind(&deposterizeV, bufTmp3.data(), dest, width, height, placeholder::_1, placeholder::_2), 0, height); - GlobalThreadPool::Loop(std::bind(&deposterizeH, dest, bufTmp3.data(), width, placeholder::_1, placeholder::_2), 0, height); - GlobalThreadPool::Loop(std::bind(&deposterizeV, bufTmp3.data(), dest, width, height, placeholder::_1, placeholder::_2), 0, height); + GlobalThreadPool::Loop(std::bind(&deposterizeH, source, bufTmp3.data(), width, std::placeholders::_1, std::placeholders::_2), 0, height); + GlobalThreadPool::Loop(std::bind(&deposterizeV, bufTmp3.data(), dest, width, height, std::placeholders::_1, std::placeholders::_2), 0, height); + GlobalThreadPool::Loop(std::bind(&deposterizeH, dest, bufTmp3.data(), width, std::placeholders::_1, std::placeholders::_2), 0, height); + GlobalThreadPool::Loop(std::bind(&deposterizeV, bufTmp3.data(), dest, width, height, std::placeholders::_1, std::placeholders::_2), 0, height); } diff --git a/GPU/Debugger/Stepping.h b/GPU/Debugger/Stepping.h index 5c9e1835e..cb651af23 100644 --- a/GPU/Debugger/Stepping.h +++ b/GPU/Debugger/Stepping.h @@ -17,7 +17,8 @@ #pragma once -#include "base/functional.h" +#include + #include "Common/CommonTypes.h" #include "GPU/Common/GPUDebugInterface.h" diff --git a/GPU/Directx9/TextureScalerDX9.cpp b/GPU/Directx9/TextureScalerDX9.cpp index 40057d9bb..a31dbd3af 100644 --- a/GPU/Directx9/TextureScalerDX9.cpp +++ b/GPU/Directx9/TextureScalerDX9.cpp @@ -47,15 +47,15 @@ void TextureScalerDX9::ConvertTo8888(u32 format, u32* source, u32* &dest, int wi break; case D3DFMT_A4R4G4B4: - GlobalThreadPool::Loop(std::bind(&convert4444_dx9, (u16*)source, dest, width, placeholder::_1, placeholder::_2), 0, height); + GlobalThreadPool::Loop(std::bind(&convert4444_dx9, (u16*)source, dest, width, std::placeholders::_1, std::placeholders::_2), 0, height); break; case D3DFMT_R5G6B5: - GlobalThreadPool::Loop(std::bind(&convert565_dx9, (u16*)source, dest, width, placeholder::_1, placeholder::_2), 0, height); + GlobalThreadPool::Loop(std::bind(&convert565_dx9, (u16*)source, dest, width, std::placeholders::_1, std::placeholders::_2), 0, height); break; case D3DFMT_A1R5G5B5: - GlobalThreadPool::Loop(std::bind(&convert5551_dx9, (u16*)source, dest, width, placeholder::_1, placeholder::_2), 0, height); + GlobalThreadPool::Loop(std::bind(&convert5551_dx9, (u16*)source, dest, width, std::placeholders::_1, std::placeholders::_2), 0, height); break; default: @@ -64,4 +64,4 @@ void TextureScalerDX9::ConvertTo8888(u32 format, u32* source, u32* &dest, int wi } } -} // namespace \ No newline at end of file +} // namespace diff --git a/GPU/GLES/TextureScaler.cpp b/GPU/GLES/TextureScaler.cpp index 5a141330d..65e148434 100644 --- a/GPU/GLES/TextureScaler.cpp +++ b/GPU/GLES/TextureScaler.cpp @@ -44,15 +44,15 @@ void TextureScalerGL::ConvertTo8888(u32 format, u32* source, u32* &dest, int wid break; case GL_UNSIGNED_SHORT_4_4_4_4: - GlobalThreadPool::Loop(std::bind(&convert4444_gl, (u16*)source, dest, width, placeholder::_1, placeholder::_2), 0, height); + GlobalThreadPool::Loop(std::bind(&convert4444_gl, (u16*)source, dest, width, std::placeholders::_1, std::placeholders::_2), 0, height); break; case GL_UNSIGNED_SHORT_5_6_5: - GlobalThreadPool::Loop(std::bind(&convert565_gl, (u16*)source, dest, width, placeholder::_1, placeholder::_2), 0, height); + GlobalThreadPool::Loop(std::bind(&convert565_gl, (u16*)source, dest, width, std::placeholders::_1, std::placeholders::_2), 0, height); break; case GL_UNSIGNED_SHORT_5_5_5_1: - GlobalThreadPool::Loop(std::bind(&convert5551_gl, (u16*)source, dest, width, placeholder::_1, placeholder::_2), 0, height); + GlobalThreadPool::Loop(std::bind(&convert5551_gl, (u16*)source, dest, width, std::placeholders::_1, std::placeholders::_2), 0, height); break; default: diff --git a/GPU/Vulkan/TextureScalerVulkan.cpp b/GPU/Vulkan/TextureScalerVulkan.cpp index 278607349..27f43bcda 100644 --- a/GPU/Vulkan/TextureScalerVulkan.cpp +++ b/GPU/Vulkan/TextureScalerVulkan.cpp @@ -51,15 +51,15 @@ void TextureScalerVulkan::ConvertTo8888(u32 format, u32* source, u32* &dest, int break; case VULKAN_4444_FORMAT: - GlobalThreadPool::Loop(std::bind(&convert4444_dx9, (u16*)source, dest, width, placeholder::_1, placeholder::_2), 0, height); + GlobalThreadPool::Loop(std::bind(&convert4444_dx9, (u16*)source, dest, width, std::placeholders::_1, std::placeholders::_2), 0, height); break; case VULKAN_565_FORMAT: - GlobalThreadPool::Loop(std::bind(&convert565_dx9, (u16*)source, dest, width, placeholder::_1, placeholder::_2), 0, height); + GlobalThreadPool::Loop(std::bind(&convert565_dx9, (u16*)source, dest, width, std::placeholders::_1, std::placeholders::_2), 0, height); break; case VULKAN_1555_FORMAT: - GlobalThreadPool::Loop(std::bind(&convert5551_dx9, (u16*)source, dest, width, placeholder::_1, placeholder::_2), 0, height); + GlobalThreadPool::Loop(std::bind(&convert5551_dx9, (u16*)source, dest, width, std::placeholders::_1, std::placeholders::_2), 0, height); break; default: diff --git a/UI/ControlMappingScreen.cpp b/UI/ControlMappingScreen.cpp index 8086cf59d..ec48c0b08 100644 --- a/UI/ControlMappingScreen.cpp +++ b/UI/ControlMappingScreen.cpp @@ -176,19 +176,19 @@ void ControlMapper::MappedCallback(KeyDef kdf) { UI::EventReturn ControlMapper::OnReplace(UI::EventParams ¶ms) { actionIndex_ = atoi(params.v->Tag().c_str()); action_ = REPLACEONE; - scrm_->push(new KeyMappingNewKeyDialog(pspKey_, true, std::bind(&ControlMapper::MappedCallback, this, placeholder::_1))); + scrm_->push(new KeyMappingNewKeyDialog(pspKey_, true, std::bind(&ControlMapper::MappedCallback, this, std::placeholders::_1))); return UI::EVENT_DONE; } UI::EventReturn ControlMapper::OnReplaceAll(UI::EventParams ¶ms) { action_ = REPLACEALL; - scrm_->push(new KeyMappingNewKeyDialog(pspKey_, true, std::bind(&ControlMapper::MappedCallback, this, placeholder::_1))); + scrm_->push(new KeyMappingNewKeyDialog(pspKey_, true, std::bind(&ControlMapper::MappedCallback, this, std::placeholders::_1))); return UI::EVENT_DONE; } UI::EventReturn ControlMapper::OnAdd(UI::EventParams ¶ms) { action_ = ADD; - scrm_->push(new KeyMappingNewKeyDialog(pspKey_, true, std::bind(&ControlMapper::MappedCallback, this, placeholder::_1))); + scrm_->push(new KeyMappingNewKeyDialog(pspKey_, true, std::bind(&ControlMapper::MappedCallback, this, std::placeholders::_1))); return UI::EVENT_DONE; } diff --git a/UI/ControlMappingScreen.h b/UI/ControlMappingScreen.h index 69fd34e73..0c15b6ba1 100644 --- a/UI/ControlMappingScreen.h +++ b/UI/ControlMappingScreen.h @@ -17,8 +17,9 @@ #pragma once +#include #include -#include "base/functional.h" + #include "base/mutex.h" #include "ui/view.h" #include "ui/ui_screen.h" diff --git a/UI/CwCheatScreen.h b/UI/CwCheatScreen.h index af4379ad2..e78f8dbdb 100644 --- a/UI/CwCheatScreen.h +++ b/UI/CwCheatScreen.h @@ -15,7 +15,8 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. -#include "base/functional.h" +#include + #include "ui/view.h" #include "ui/ui_screen.h" #include "ui/ui_context.h" diff --git a/UI/DevScreens.h b/UI/DevScreens.h index 42130a4cd..e06a9bdb7 100644 --- a/UI/DevScreens.h +++ b/UI/DevScreens.h @@ -17,11 +17,11 @@ #pragma once -#include +#include #include #include +#include -#include "base/functional.h" #include "file/file_util.h" #include "ui/ui_screen.h" diff --git a/UI/GameScreen.cpp b/UI/GameScreen.cpp index bd4e9b444..142f090c4 100644 --- a/UI/GameScreen.cpp +++ b/UI/GameScreen.cpp @@ -175,7 +175,7 @@ UI::EventReturn GameScreen::OnDeleteConfig(UI::EventParams &e) I18NCategory *ga = GetI18NCategory("Game"); screenManager()->push( new PromptScreen(di->T("DeleteConfirmGameConfig", "Do you really want to delete the settings for this game?"), ga->T("ConfirmDelete"), di->T("Cancel"), - std::bind(&GameScreen::CallbackDeleteConfig, this, placeholder::_1))); + std::bind(&GameScreen::CallbackDeleteConfig, this, std::placeholders::_1))); return UI::EVENT_DONE; } @@ -289,7 +289,7 @@ UI::EventReturn GameScreen::OnDeleteSaveData(UI::EventParams &e) { if (saveDirs.size()) { screenManager()->push( new PromptScreen(di->T("DeleteConfirmAll", "Do you really want to delete all\nyour save data for this game?"), ga->T("ConfirmDelete"), di->T("Cancel"), - std::bind(&GameScreen::CallbackDeleteSaveData, this, placeholder::_1))); + std::bind(&GameScreen::CallbackDeleteSaveData, this, std::placeholders::_1))); } } @@ -313,7 +313,7 @@ UI::EventReturn GameScreen::OnDeleteGame(UI::EventParams &e) { if (info) { screenManager()->push( new PromptScreen(di->T("DeleteConfirmGame", "Do you really want to delete this game\nfrom your device? You can't undo this."), ga->T("ConfirmDelete"), di->T("Cancel"), - std::bind(&GameScreen::CallbackDeleteGame, this, placeholder::_1))); + std::bind(&GameScreen::CallbackDeleteGame, this, std::placeholders::_1))); } return UI::EVENT_DONE; diff --git a/UI/GameScreen.h b/UI/GameScreen.h index 601df037a..8b0a821ed 100644 --- a/UI/GameScreen.h +++ b/UI/GameScreen.h @@ -17,8 +17,9 @@ #pragma once +#include + #include "UI/MiscScreens.h" -#include "base/functional.h" #include "ui/ui_screen.h" // Game screen: Allows you to start a game, delete saves, delete the game, diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index f2f53b333..2b2743c39 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -961,7 +961,7 @@ UI::EventReturn GameSettingsScreen::OnRenderingBackend(UI::EventParams &e) { // It only makes sense to show the restart prompt if the backend was actually changed. if (g_Config.iGPUBackend != (int)GetGPUBackend()) { screenManager()->push(new PromptScreen(di->T("ChangingGPUBackends", "Changing GPU backends requires PPSSPP to restart. Restart now?"), di->T("Yes"), di->T("No"), - std::bind(&GameSettingsScreen::CallbackRenderingBackend, this, placeholder::_1))); + std::bind(&GameSettingsScreen::CallbackRenderingBackend, this, std::placeholders::_1))); } #endif return UI::EVENT_DONE; @@ -1165,13 +1165,13 @@ UI::EventReturn GameSettingsScreen::OnRestoreDefaultSettings(UI::EventParams &e) { screenManager()->push( new PromptScreen(dev->T("RestoreGameDefaultSettings", "Are you sure you want to restore the game-specific settings back to the ppsspp defaults?\n"), di->T("OK"), di->T("Cancel"), - std::bind(&GameSettingsScreen::CallbackRestoreDefaults, this, placeholder::_1))); + std::bind(&GameSettingsScreen::CallbackRestoreDefaults, this, std::placeholders::_1))); } else { screenManager()->push( new PromptScreen(dev->T("RestoreDefaultSettings", "Are you sure you want to restore all settings(except control mapping)\nback to their defaults?\nYou can't undo this.\nPlease restart PPSSPP after restoring settings."), di->T("OK"), di->T("Cancel"), - std::bind(&GameSettingsScreen::CallbackRestoreDefaults, this, placeholder::_1))); + std::bind(&GameSettingsScreen::CallbackRestoreDefaults, this, std::placeholders::_1))); } return UI::EVENT_DONE; diff --git a/UI/InstallZipScreen.h b/UI/InstallZipScreen.h index c340cf827..41d55346a 100644 --- a/UI/InstallZipScreen.h +++ b/UI/InstallZipScreen.h @@ -17,7 +17,8 @@ #pragma once -#include "base/functional.h" +#include + #include "ui/view.h" #include "ui/ui_screen.h" diff --git a/UI/MainScreen.h b/UI/MainScreen.h index 3f3f4ba44..94292f684 100644 --- a/UI/MainScreen.h +++ b/UI/MainScreen.h @@ -17,7 +17,8 @@ #pragma once -#include "base/functional.h" +#include + #include "file/path.h" #include "ui/ui_screen.h" #include "ui/viewgroup.h" diff --git a/UI/MiscScreens.cpp b/UI/MiscScreens.cpp index 8e854558e..0e6141691 100644 --- a/UI/MiscScreens.cpp +++ b/UI/MiscScreens.cpp @@ -16,8 +16,8 @@ // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. #include +#include -#include "base/functional.h" #include "base/colorutil.h" #include "base/display.h" #include "base/timeutil.h" diff --git a/UI/MiscScreens.h b/UI/MiscScreens.h index 04e0de9e3..63bd461bf 100644 --- a/UI/MiscScreens.h +++ b/UI/MiscScreens.h @@ -17,12 +17,12 @@ #pragma once -#include +#include #include #include +#include #include "file/file_util.h" -#include "base/functional.h" #include "ui/ui_screen.h" struct ShaderInfo; diff --git a/UI/PauseScreen.cpp b/UI/PauseScreen.cpp index 5c4fac4ec..f2e7cacfe 100644 --- a/UI/PauseScreen.cpp +++ b/UI/PauseScreen.cpp @@ -445,7 +445,7 @@ UI::EventReturn GamePauseScreen::OnDeleteConfig(UI::EventParams &e) I18NCategory *ga = GetI18NCategory("Game"); screenManager()->push( new PromptScreen(di->T("DeleteConfirmGameConfig", "Do you really want to delete the settings for this game?"), ga->T("ConfirmDelete"), di->T("Cancel"), - std::bind(&GamePauseScreen::CallbackDeleteConfig, this, placeholder::_1))); + std::bind(&GamePauseScreen::CallbackDeleteConfig, this, std::placeholders::_1))); return UI::EVENT_DONE; } diff --git a/UI/PauseScreen.h b/UI/PauseScreen.h index 0057b778f..b25e669e9 100644 --- a/UI/PauseScreen.h +++ b/UI/PauseScreen.h @@ -17,7 +17,8 @@ #pragma once -#include "base/functional.h" +#include + #include "ui/ui_screen.h" #include "ui/viewgroup.h" #include "UI/MiscScreens.h" diff --git a/UI/RemoteISOScreen.h b/UI/RemoteISOScreen.h index fe72637b5..b153fe4fe 100644 --- a/UI/RemoteISOScreen.h +++ b/UI/RemoteISOScreen.h @@ -17,7 +17,8 @@ #pragma once -#include "base/functional.h" +#include + #include "ui/ui_screen.h" #include "ui/viewgroup.h" #include "UI/MiscScreens.h" diff --git a/UI/ReportScreen.h b/UI/ReportScreen.h index 0808907f3..0acfbb36a 100644 --- a/UI/ReportScreen.h +++ b/UI/ReportScreen.h @@ -17,7 +17,8 @@ #pragma once -#include "base/functional.h" +#include + #include "ui/ui_screen.h" #include "ui/viewgroup.h" #include "UI/MiscScreens.h" diff --git a/UI/SavedataScreen.h b/UI/SavedataScreen.h index cbc190b9d..adf688013 100644 --- a/UI/SavedataScreen.h +++ b/UI/SavedataScreen.h @@ -17,9 +17,9 @@ #pragma once +#include #include -#include "base/functional.h" #include "ui/ui_screen.h" #include "ui/view.h" #include "ui/viewgroup.h" diff --git a/UI/Store.cpp b/UI/Store.cpp index b9569698c..ada2d8542 100644 --- a/UI/Store.cpp +++ b/UI/Store.cpp @@ -15,7 +15,8 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. -#include "base/functional.h" +#include + #include "base/basictypes.h" #include "ext/vjson/json.h" @@ -135,7 +136,7 @@ void HttpImageFileView::DownloadCompletedCallback(http::Download &download) { void HttpImageFileView::Draw(UIContext &dc) { if (!texture_ && !textureFailed_ && !path_.empty() && !download_) { - download_ = downloader_->StartDownloadWithCallback(path_, "", std::bind(&HttpImageFileView::DownloadCompletedCallback, this, placeholder::_1)); + download_ = downloader_->StartDownloadWithCallback(path_, "", std::bind(&HttpImageFileView::DownloadCompletedCallback, this, std::placeholders::_1)); download_->SetHidden(true); } diff --git a/UI/Store.h b/UI/Store.h index 9f00dc752..cbca3d098 100644 --- a/UI/Store.h +++ b/UI/Store.h @@ -17,7 +17,8 @@ #pragma once -#include "base/functional.h" +#include + #include "ui/ui_screen.h" #include "ui/viewgroup.h" #include "net/http_client.h" diff --git a/UI/TiltAnalogSettingsScreen.h b/UI/TiltAnalogSettingsScreen.h index 59e43cb1a..9dcd5b3f5 100644 --- a/UI/TiltAnalogSettingsScreen.h +++ b/UI/TiltAnalogSettingsScreen.h @@ -17,7 +17,8 @@ #pragma once -#include "base/functional.h" +#include + #include "ui/view.h" #include "MiscScreens.h" diff --git a/UI/TouchControlLayoutScreen.h b/UI/TouchControlLayoutScreen.h index 342c5d418..59e3d9fd6 100644 --- a/UI/TouchControlLayoutScreen.h +++ b/UI/TouchControlLayoutScreen.h @@ -17,11 +17,12 @@ #pragma once -#include "base/functional.h" +#include +#include + #include "ui/view.h" #include "ui/viewgroup.h" #include "MiscScreens.h" -#include class DragDropButton; diff --git a/Windows/GEDebugger/GEDebugger.cpp b/Windows/GEDebugger/GEDebugger.cpp index ed71dc20f..bb17f988d 100644 --- a/Windows/GEDebugger/GEDebugger.cpp +++ b/Windows/GEDebugger/GEDebugger.cpp @@ -15,11 +15,11 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. -#include -#include +#include #include +#include +#include -#include "base/functional.h" #include "Common/ColorConv.h" #include "Windows/GEDebugger/GEDebugger.h" #include "Windows/GEDebugger/SimpleGLWindow.h" diff --git a/Windows/GEDebugger/SimpleGLWindow.h b/Windows/GEDebugger/SimpleGLWindow.h index 23b1f40ef..b0ce979e3 100644 --- a/Windows/GEDebugger/SimpleGLWindow.h +++ b/Windows/GEDebugger/SimpleGLWindow.h @@ -17,7 +17,8 @@ #pragma once -#include "base/functional.h" +#include + #include "gfx_es2/glsl_program.h" #include "Common/CommonWindows.h" #include "Globals.h" @@ -156,4 +157,4 @@ protected: u32 reformatBufSize_; std::function hoverCallback_; -}; \ No newline at end of file +}; diff --git a/Windows/W32Util/ShellUtil.cpp b/Windows/W32Util/ShellUtil.cpp index e3f8c4997..c8ff175c3 100644 --- a/Windows/W32Util/ShellUtil.cpp +++ b/Windows/W32Util/ShellUtil.cpp @@ -4,7 +4,8 @@ #include "stdafx.h" -#include "base/functional.h" +#include + #include "thread/thread.h" #include "util/text/utf8.h" #include "ShellUtil.h" @@ -163,4 +164,4 @@ namespace W32Util PostMessage(parent_, completeMsg_, 0, 0); } -} \ No newline at end of file +} diff --git a/ext/native/base/functional.h b/ext/native/base/functional.h deleted file mode 100644 index b9a85f3f4..000000000 --- a/ext/native/base/functional.h +++ /dev/null @@ -1,35 +0,0 @@ -// This file simply includes and applies any necessary compatibility fixes for -// strange platforms like iOS. - -// Use placeholder as the namespace for placeholders. - -#pragma once - -#include -#include -#include - -#if defined(MACGNUSTD) -#include -#include -namespace std { - using tr1::bind; - using tr1::function; - using tr1::shared_ptr; - - template - inline shared_ptr make_shared() - { - return shared_ptr(new T()); - } - - template - inline shared_ptr make_shared(Arg1& arg1) - { - return shared_ptr(new T(arg1)); - } -} -#endif - -namespace placeholder = std::placeholders; - diff --git a/ext/native/native.vcxproj b/ext/native/native.vcxproj index 23ef8d022..725020c74 100644 --- a/ext/native/native.vcxproj +++ b/ext/native/native.vcxproj @@ -196,7 +196,6 @@ - diff --git a/ext/native/native.vcxproj.filters b/ext/native/native.vcxproj.filters index 93aa00cf2..005f79ffb 100644 --- a/ext/native/native.vcxproj.filters +++ b/ext/native/native.vcxproj.filters @@ -203,9 +203,6 @@ net - - base - ui diff --git a/ext/native/net/http_client.h b/ext/native/net/http_client.h index cb150631e..1469b98a2 100644 --- a/ext/native/net/http_client.h +++ b/ext/native/net/http_client.h @@ -1,11 +1,12 @@ #ifndef _NET_HTTP_HTTP_CLIENT #define _NET_HTTP_HTTP_CLIENT +#include #include + #include "base/basictypes.h" #include "base/buffer.h" #include "thread/thread.h" -#include "base/functional.h" #ifdef _WIN32 #define NOMINMAX diff --git a/ext/native/net/http_server.cpp b/ext/native/net/http_server.cpp index 27de698b9..4d55afcda 100644 --- a/ext/native/net/http_server.cpp +++ b/ext/native/net/http_server.cpp @@ -21,10 +21,11 @@ #endif #include +#include + #include #include -#include "base/functional.h" #include "base/logging.h" #include "base/buffer.h" #include "file/fd_util.h" @@ -114,8 +115,8 @@ void Request::Close() { Server::Server(threading::Executor *executor) : port_(0), executor_(executor) { - RegisterHandler("/", std::bind(&Server::HandleListing, this, placeholder::_1)); - SetFallbackHandler(std::bind(&Server::Handle404, this, placeholder::_1)); + RegisterHandler("/", std::bind(&Server::HandleListing, this, std::placeholders::_1)); + SetFallbackHandler(std::bind(&Server::Handle404, this, std::placeholders::_1)); } void Server::RegisterHandler(const char *url_path, UrlHandlerFunc handler) { diff --git a/ext/native/net/http_server.h b/ext/native/net/http_server.h index 9035015f9..974b45ee6 100644 --- a/ext/native/net/http_server.h +++ b/ext/native/net/http_server.h @@ -1,9 +1,9 @@ #ifndef _HTTP_SERVER_H #define _HTTP_SERVER_H +#include #include -#include "base/functional.h" #include "base/buffer.h" #include "net/http_headers.h" #include "thread/executor.h" diff --git a/ext/native/thread/executor.cpp b/ext/native/thread/executor.cpp index abba1fb80..8c5d6cd09 100644 --- a/ext/native/thread/executor.cpp +++ b/ext/native/thread/executor.cpp @@ -1,5 +1,6 @@ #include "thread/executor.h" -#include "base/functional.h" + +#include namespace threading { diff --git a/ext/native/thread/executor.h b/ext/native/thread/executor.h index dcc7cd817..7a5b5286a 100644 --- a/ext/native/thread/executor.h +++ b/ext/native/thread/executor.h @@ -1,6 +1,6 @@ #pragma once -#include "base/functional.h" +#include namespace threading { diff --git a/ext/native/thread/prioritizedworkqueue.cpp b/ext/native/thread/prioritizedworkqueue.cpp index 8d6d7561c..9a54148d8 100644 --- a/ext/native/thread/prioritizedworkqueue.cpp +++ b/ext/native/thread/prioritizedworkqueue.cpp @@ -1,4 +1,5 @@ -#include "base/functional.h" +#include + #include "base/logging.h" #include "base/timeutil.h" #include "thread/thread.h" diff --git a/ext/native/thread/threadpool.h b/ext/native/thread/threadpool.h index 0a2a2f972..8bb0b2964 100644 --- a/ext/native/thread/threadpool.h +++ b/ext/native/thread/threadpool.h @@ -1,8 +1,11 @@ #pragma once +#include +#include +#include + #include "thread.h" #include "base/mutex.h" -#include "base/functional.h" // This is the simplest possible worker implementation I can think of // but entirely sufficient for the given purpose. diff --git a/ext/native/ui/ui_screen.cpp b/ext/native/ui/ui_screen.cpp index 3914296e8..a6fc102c5 100644 --- a/ext/native/ui/ui_screen.cpp +++ b/ext/native/ui/ui_screen.cpp @@ -332,7 +332,7 @@ UI::EventReturn PopupMultiChoice::HandleClick(UI::EventParams &e) { } ListPopupScreen *popupScreen = new ListPopupScreen(ChopTitle(text_), choices, *value_ - minVal_, - std::bind(&PopupMultiChoice::ChoiceCallback, this, placeholder::_1)); + std::bind(&PopupMultiChoice::ChoiceCallback, this, std::placeholders::_1)); popupScreen->SetHiddenChoices(hidden_); screenManager_->push(popupScreen); return UI::EVENT_DONE; diff --git a/ext/native/ui/view.h b/ext/native/ui/view.h index 1345f8db7..3696f2d66 100644 --- a/ext/native/ui/view.h +++ b/ext/native/ui/view.h @@ -7,15 +7,15 @@ // Works very similarly to Android, there's a Measure pass and a Layout pass which you don't // really need to care about if you just use the standard containers and widgets. -#include -#include -#include #include #include +#include +#include #include +#include +#include #include "base/logging.h" -#include "base/functional.h" #include "base/mutex.h" #include "base/basictypes.h" #include "gfx/texture_atlas.h" @@ -251,7 +251,7 @@ public: // This is suggested for use in most cases. Autobinds, allowing for neat syntax. template T *Handle(T *thiz, EventReturn (T::* theCallback)(EventParams &e)) { - Add(std::bind(theCallback, thiz, placeholder::_1)); + Add(std::bind(theCallback, thiz, std::placeholders::_1)); return thiz; } diff --git a/ext/native/ui/viewgroup.cpp b/ext/native/ui/viewgroup.cpp index 89d0c2d57..5cfb83f22 100644 --- a/ext/native/ui/viewgroup.cpp +++ b/ext/native/ui/viewgroup.cpp @@ -1,6 +1,6 @@ +#include #include -#include "base/functional.h" #include "base/logging.h" #include "base/mutex.h" #include "base/stringutil.h" @@ -1286,7 +1286,7 @@ void ListView::CreateAllItems() { for (int i = 0; i < adaptor_->GetNumItems(); i++) { if (hidden_.find(i) == hidden_.end()) { View * v = linLayout_->Add(adaptor_->CreateItemView(i)); - adaptor_->AddEventCallback(v, std::bind(&ListView::OnItemCallback, this, i, placeholder::_1)); + adaptor_->AddEventCallback(v, std::bind(&ListView::OnItemCallback, this, i, std::placeholders::_1)); } } }