simplify factory class to not rely on singleton + cleanups

This commit is contained in:
artemp
2014-11-14 12:23:27 +01:00
parent e3adc4664b
commit 761b2ba583
3 changed files with 17 additions and 29 deletions

View File

@@ -38,11 +38,9 @@ struct image_reader : private noncopyable
template <typename...Args>
bool register_image_reader(std::string const& type, image_reader* (* fun)(Args...))
{
return factory<image_reader,std::string, Args...>::instance().register_product(type, fun);
return factory<image_reader,std::string, Args...>::register_product(type, fun);
}
//image_reader* get_image_reader(std::string const& file,std::string const& type);
//image_reader* get_image_reader(std::string const& file);
image_reader* get_image_reader(char const* data, size_t size);
}}