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()<sizeof(bmp_sig))
return reinterpret_cast<Msp::IO::Seekable *>(handle)->tell();
}
-std::string error_string(ILenum err)
+string error_string(ILenum err)
{
switch(err)
{
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)
delete priv;
}
-bool PngLoader::detect(const std::string &sig)
+bool PngLoader::detect(const string &sig)
{
return !png_sig_cmp(reinterpret_cast<png_byte *>(const_cast<char*>(sig.data())), 0, sig.size());
}
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());
}
VulkanContext::~VulkanContext()
{ }
-void (*VulkanContext::_get_function(const std::string &) const)()
+void (*VulkanContext::_get_function(const string &) const)()
{
return 0;
}
namespace {
bool error_flag = false;
-std::string error_msg;
+string error_msg;
int x_error_handler(Display *display, XErrorEvent *event)
{
index(i)
{ }
-std::string ControlSource::str() const
+string ControlSource::str() const
{
if(type==BUTTON)
return dev->get_button_name(index);
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);
}
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())
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())