if(registry.changed)
{
registry.changed = false;
- sort(registry.loaders, signature_size_compare);
+ sort(registry.loaders, [](RegisterBase *r1, RegisterBase *r2){
+ return r1->get_signature_size()<r2->get_signature_size();
+ });
}
if(registry.loaders.empty())
return registry;
}
-bool ImageLoader::signature_size_compare(RegisterBase *r1, RegisterBase *r2)
-{
- return r1->get_signature_size()<r2->get_signature_size();
-}
-
ImageLoader::Registry::~Registry()
{
static void register_loader();
private:
static Registry &get_registry();
-
- static bool signature_size_compare(RegisterBase *, RegisterBase *);
};
template<typename T>
default: return RR_Rotate_0;
}
}
-
-inline bool monitor_x_compare(const Msp::Graphics::Monitor &m1, const Msp::Graphics::Monitor &m2)
-{
- if(m1.desktop_settings.mode && !m2.desktop_settings.mode)
- return true;
- if(!m1.desktop_settings.mode && m2.desktop_settings.mode)
- return false;
- return m1.desktop_settings.x<m2.desktop_settings.x;
-}
#endif
inline unsigned mode_width(const Msp::Graphics::VideoMode &m, Msp::Graphics::VideoRotation r)
monitors[i].current_settings = monitors[i].desktop_settings;
}
- sort(monitors, monitor_x_compare);
+ sort(monitors, [](const Msp::Graphics::Monitor &m1, const Msp::Graphics::Monitor &m2){
+ if(m1.desktop_settings.mode && !m2.desktop_settings.mode)
+ return true;
+ if(!m1.desktop_settings.mode && m2.desktop_settings.mode)
+ return false;
+ return m1.desktop_settings.x<m2.desktop_settings.x;
+ });
for(unsigned i=0; i<modes.size(); ++i)
{