From cea95778acfd6e172639cafd7ad249cc13ceb2a6 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 27 Nov 2022 13:14:15 +0200 Subject: [PATCH] Remove unnecessary std:: qualifiers --- source/graphics/bmploader.cpp | 2 +- source/graphics/devil/devilloader.cpp | 2 +- source/graphics/imageloader.cpp | 2 +- source/graphics/png/pngloader.cpp | 2 +- source/graphics/vkxlib/vulkancontext.cpp | 2 +- source/graphics/vulkancontext.cpp | 2 +- source/graphics/x11/display.cpp | 2 +- source/input/control.cpp | 2 +- source/input/device.cpp | 4 ++-- source/input/hub.cpp | 4 ++-- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/source/graphics/bmploader.cpp b/source/graphics/bmploader.cpp index b85cce1..eb069a1 100644 --- a/source/graphics/bmploader.cpp +++ b/source/graphics/bmploader.cpp @@ -36,7 +36,7 @@ BmpLoader::BmpLoader(IO::Base &i, unsigned sb): throw invalid_argument("BmpLoader::BmpLoader"); } -bool BmpLoader::detect(const std::string &sig) +bool BmpLoader::detect(const string &sig) { static const char bmp_sig[] = { 'B', 'M' }; if(sig.size()(handle)->tell(); } -std::string error_string(ILenum err) +string error_string(ILenum err) { switch(err) { diff --git a/source/graphics/imageloader.cpp b/source/graphics/imageloader.cpp index fe88f40..6a3196c 100644 --- a/source/graphics/imageloader.cpp +++ b/source/graphics/imageloader.cpp @@ -27,7 +27,7 @@ ImageLoader::~ImageLoader() delete source; } -bool ImageLoader::detect_signature(const std::string &sig) +bool ImageLoader::detect_signature(const string &sig) { Registry ®istry = get_registry(); for(const RegisterBase *r: registry.loaders) diff --git a/source/graphics/png/pngloader.cpp b/source/graphics/png/pngloader.cpp index 850bbf0..7842c18 100644 --- a/source/graphics/png/pngloader.cpp +++ b/source/graphics/png/pngloader.cpp @@ -50,7 +50,7 @@ PngLoader::~PngLoader() delete priv; } -bool PngLoader::detect(const std::string &sig) +bool PngLoader::detect(const string &sig) { return !png_sig_cmp(reinterpret_cast(const_cast(sig.data())), 0, sig.size()); } diff --git a/source/graphics/vkxlib/vulkancontext.cpp b/source/graphics/vkxlib/vulkancontext.cpp index 439ece6..7026e30 100644 --- a/source/graphics/vkxlib/vulkancontext.cpp +++ b/source/graphics/vkxlib/vulkancontext.cpp @@ -233,7 +233,7 @@ VulkanContext::~VulkanContext() delete priv; } -void (*VulkanContext::_get_function(const std::string &name) const)() +void (*VulkanContext::_get_function(const string &name) const)() { return vkGetInstanceProcAddr(priv->instance, name.c_str()); } diff --git a/source/graphics/vulkancontext.cpp b/source/graphics/vulkancontext.cpp index b279c94..5b2831a 100644 --- a/source/graphics/vulkancontext.cpp +++ b/source/graphics/vulkancontext.cpp @@ -26,7 +26,7 @@ void VulkanContext::platform_init(const VulkanOptions &) VulkanContext::~VulkanContext() { } -void (*VulkanContext::_get_function(const std::string &) const)() +void (*VulkanContext::_get_function(const string &) const)() { return 0; } diff --git a/source/graphics/x11/display.cpp b/source/graphics/x11/display.cpp index 9e82627..edc6a12 100644 --- a/source/graphics/x11/display.cpp +++ b/source/graphics/x11/display.cpp @@ -14,7 +14,7 @@ using namespace std; namespace { bool error_flag = false; -std::string error_msg; +string error_msg; int x_error_handler(Display *display, XErrorEvent *event) { diff --git a/source/input/control.cpp b/source/input/control.cpp index 17436a8..2bb4104 100644 --- a/source/input/control.cpp +++ b/source/input/control.cpp @@ -15,7 +15,7 @@ ControlSource::ControlSource(Device &d, ControlSrcType t, unsigned i): index(i) { } -std::string ControlSource::str() const +string ControlSource::str() const { if(type==BUTTON) return dev->get_button_name(index); diff --git a/source/input/device.cpp b/source/input/device.cpp index 87102f6..4aa8ce6 100644 --- a/source/input/device.cpp +++ b/source/input/device.cpp @@ -39,12 +39,12 @@ float Device::get_axis_value(unsigned axis) const return axes[axis]; } -std::string Device::get_button_name(unsigned btn) const +string Device::get_button_name(unsigned btn) const { return format("Button %d", btn); } -std::string Device::get_axis_name(unsigned axis) const +string Device::get_axis_name(unsigned axis) const { return format("Axis %d", axis); } diff --git a/source/input/hub.cpp b/source/input/hub.cpp index 5325122..e7eb0fc 100644 --- a/source/input/hub.cpp +++ b/source/input/hub.cpp @@ -47,7 +47,7 @@ Device *Hub::find_subdevice(const string &n) return 0; } -std::string Hub::get_button_name(unsigned btn) const +string Hub::get_button_name(unsigned btn) const { unsigned dev_index = btn>>8; if(dev_index>=devices.size()) @@ -57,7 +57,7 @@ std::string Hub::get_button_name(unsigned btn) const return dev.get_name()+": "+dev.get_button_name(btn&0xFF); } -std::string Hub::get_axis_name(unsigned axis) const +string Hub::get_axis_name(unsigned axis) const { unsigned dev_index = axis>>8; if(dev_index>=devices.size()) -- 2.45.2