# HG changeset patch # User David Demelier # Date 1480454717 -3600 # Node ID fabbe1759cec42c3c71d25117571f8d836fb8622 # Parent a47a4477f347d86f774d06a2a76e2f90b6e4592d Misc: switch to mlk namespace, closes #589 diff -r a47a4477f347 -r fabbe1759cec database/sqlite/src/account.cpp --- a/database/sqlite/src/account.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/database/sqlite/src/account.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -24,7 +24,7 @@ #include "driver.hpp" -using namespace malikania; +using namespace mlk; namespace { diff -r a47a4477f347 -r fabbe1759cec libclient-js/malikania/js_animation.cpp --- a/libclient-js/malikania/js_animation.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient-js/malikania/js_animation.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -21,7 +21,7 @@ #include "js_client_resources_loader.hpp" #include "js_animation.hpp" -namespace malikania { +namespace mlk { namespace { @@ -105,4 +105,4 @@ duk_pop(ctx); } -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libclient-js/malikania/js_animation.hpp --- a/libclient-js/malikania/js_animation.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient-js/malikania/js_animation.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -23,7 +23,7 @@ #include "animation.hpp" -namespace malikania { +namespace mlk { #if 0 /** @@ -55,6 +55,6 @@ */ void dukx_load_animation(duk_context* ctx); -} // !malikania +} // !mlk #endif // !MALIKANIA_JS_ANIMATION_HPP diff -r a47a4477f347 -r fabbe1759cec libclient-js/malikania/js_animator.cpp --- a/libclient-js/malikania/js_animator.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient-js/malikania/js_animator.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -24,7 +24,7 @@ #include "js_point.hpp" #include "js_window.hpp" -namespace malikania { +namespace mlk { namespace { @@ -150,4 +150,4 @@ duk_pop(ctx); } -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libclient-js/malikania/js_animator.hpp --- a/libclient-js/malikania/js_animator.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient-js/malikania/js_animator.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -22,7 +22,7 @@ #include "animator.hpp" #include "duktape.hpp" -namespace malikania { +namespace mlk { #if 0 @@ -50,6 +50,6 @@ void dukx_load_animator(duk_context* ctx); -} // !malikania +} // !mlk #endif // !MALIKANIA_JS_ANIMATOR_HPP diff -r a47a4477f347 -r fabbe1759cec libclient-js/malikania/js_client_resources_loader.cpp --- a/libclient-js/malikania/js_client_resources_loader.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient-js/malikania/js_client_resources_loader.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -21,7 +21,7 @@ #include "js_client_resources_loader.hpp" #include "js_resources_loader.hpp" -namespace malikania { +namespace mlk { namespace { @@ -55,4 +55,4 @@ return *static_cast(ptr); } -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libclient-js/malikania/js_client_resources_loader.hpp --- a/libclient-js/malikania/js_client_resources_loader.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient-js/malikania/js_client_resources_loader.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -22,12 +22,12 @@ #include "client_resources_loader.hpp" #include "duktape.hpp" -namespace malikania { +namespace mlk { void dukx_put_client_loader(duk_context* ctx, client_resources_loader&); client_resources_loader& dukx_get_client_loader(duk_context* ctx); -} // !malikania +} // !mlk #endif // !MALIKANIA_JS_CLIENT_RESOURCES_LOADER_H diff -r a47a4477f347 -r fabbe1759cec libclient-js/malikania/js_color.cpp --- a/libclient-js/malikania/js_color.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient-js/malikania/js_color.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -21,7 +21,7 @@ #include "js_color.hpp" #include "util.hpp" -namespace malikania { +namespace mlk { namespace { @@ -193,4 +193,4 @@ duk_pop(ctx); } -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libclient-js/malikania/js_color.hpp --- a/libclient-js/malikania/js_color.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient-js/malikania/js_color.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -40,7 +40,7 @@ #include "color.hpp" #include "duktape.hpp" -namespace malikania { +namespace mlk { /** * Get a color. @@ -91,6 +91,6 @@ void dukx_load_color(duk_context* ctx); -} // !malikania +} // !mlk #endif // !MALIKANIA_JS_COLOR_HPP diff -r a47a4477f347 -r fabbe1759cec libclient-js/malikania/js_font.cpp --- a/libclient-js/malikania/js_font.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient-js/malikania/js_font.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -22,7 +22,7 @@ #include "js_font.hpp" #include "js_size.hpp" -namespace malikania { +namespace mlk { namespace { @@ -137,4 +137,4 @@ duk_pop(ctx); } -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libclient-js/malikania/js_font.hpp --- a/libclient-js/malikania/js_font.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient-js/malikania/js_font.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -22,7 +22,7 @@ #include "duktape.hpp" #include "font.hpp" -namespace malikania { +namespace mlk { #if 0 void dukx_new_font(duk_context *ctx, Font *font); @@ -32,6 +32,6 @@ void dukx_load_font(duk_context* ctx); -} // !malikania +} // !mlk #endif // !MALIKANIA_JS_FONT_HPP diff -r a47a4477f347 -r fabbe1759cec libclient-js/malikania/js_image.cpp --- a/libclient-js/malikania/js_image.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient-js/malikania/js_image.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -23,7 +23,7 @@ #include "js_size.hpp" #include "js_window.hpp" -namespace malikania { +namespace mlk { namespace { @@ -132,4 +132,4 @@ duk_pop(ctx); } -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libclient-js/malikania/js_image.hpp --- a/libclient-js/malikania/js_image.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient-js/malikania/js_image.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -22,7 +22,7 @@ #include "duktape.hpp" #include "image.hpp" -namespace malikania { +namespace mlk { #if 0 void dukx_new_image(duk_context* ctx, image& image); @@ -30,6 +30,6 @@ void dukx_load_image(duk_context* ctx); -} // !malikania +} // !mlk #endif // !MALIKANIA_JS_IMAGE_HPP diff -r a47a4477f347 -r fabbe1759cec libclient-js/malikania/js_line.cpp --- a/libclient-js/malikania/js_line.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient-js/malikania/js_line.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -20,7 +20,7 @@ #include "js_line.hpp" -namespace malikania { +namespace mlk { namespace { @@ -133,4 +133,4 @@ duk_pop(ctx); } -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libclient-js/malikania/js_line.hpp --- a/libclient-js/malikania/js_line.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient-js/malikania/js_line.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -38,7 +38,7 @@ #include "duktape.hpp" #include "line.hpp" -namespace malikania { +namespace mlk { /** * Get a line. @@ -88,6 +88,6 @@ void dukx_load_line(duk_context* ctx); -} // !malikania +} // !mlk #endif // !MALIKANIA_JS_LINE_HPP diff -r a47a4477f347 -r fabbe1759cec libclient-js/malikania/js_point.cpp --- a/libclient-js/malikania/js_point.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient-js/malikania/js_point.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -20,7 +20,7 @@ #include "js_point.hpp" -namespace malikania { +namespace mlk { namespace { @@ -127,4 +127,4 @@ duk_pop(ctx); } -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libclient-js/malikania/js_point.hpp --- a/libclient-js/malikania/js_point.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient-js/malikania/js_point.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -22,7 +22,7 @@ #include "duktape.hpp" #include "point.hpp" -namespace malikania { +namespace mlk { point dukx_require_point(duk_context* ctx, duk_idx_t index); @@ -34,6 +34,6 @@ void dukx_load_point(duk_context* ctx); -} // !malikania +} // !mlk #endif // !MALIKANIA_JS_POINT_HPP diff -r a47a4477f347 -r fabbe1759cec libclient-js/malikania/js_rectangle.cpp --- a/libclient-js/malikania/js_rectangle.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient-js/malikania/js_rectangle.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -20,7 +20,7 @@ #include "js_rectangle.hpp" -namespace malikania { +namespace mlk { namespace { @@ -148,4 +148,4 @@ duk_pop(ctx); } -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libclient-js/malikania/js_rectangle.hpp --- a/libclient-js/malikania/js_rectangle.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient-js/malikania/js_rectangle.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -38,7 +38,7 @@ #include "duktape.hpp" #include "rectangle.hpp" -namespace malikania { +namespace mlk { /** * Get a rectangle. @@ -90,6 +90,6 @@ void dukx_load_rect(duk_context* ctx); -} // !malikania +} // !mlk #endif // !MALIKANIA_JS_RECTANGLE_HPP diff -r a47a4477f347 -r fabbe1759cec libclient-js/malikania/js_size.cpp --- a/libclient-js/malikania/js_size.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient-js/malikania/js_size.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -20,7 +20,7 @@ #include "js_size.hpp" -namespace malikania { +namespace mlk { namespace { @@ -143,4 +143,4 @@ duk_pop(ctx); } -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libclient-js/malikania/js_size.hpp --- a/libclient-js/malikania/js_size.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient-js/malikania/js_size.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -36,7 +36,7 @@ #include "duktape.hpp" #include "size.hpp" -namespace malikania { +namespace mlk { /** * Get a size. @@ -88,6 +88,6 @@ void dukx_load_size(duk_context* ctx); -} // !malikania +} // !mlk #endif // !MALIKANIA_JS_SIZE_HPP diff -r a47a4477f347 -r fabbe1759cec libclient-js/malikania/js_sprite.cpp --- a/libclient-js/malikania/js_sprite.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient-js/malikania/js_sprite.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -22,7 +22,7 @@ #include "js_sprite.hpp" #include "js_window.hpp" -namespace malikania { +namespace mlk { namespace { @@ -166,4 +166,4 @@ duk_pop(ctx); } -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libclient-js/malikania/js_sprite.hpp --- a/libclient-js/malikania/js_sprite.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient-js/malikania/js_sprite.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -22,10 +22,10 @@ #include "duktape.hpp" #include "sprite.hpp" -namespace malikania { +namespace mlk { void dukx_load_sprite(duk_context* ctx); -} // !malikania +} // !mlk #endif // !MALIKANIA_JS_SPRITE_HPP diff -r a47a4477f347 -r fabbe1759cec libclient-js/malikania/js_window.cpp --- a/libclient-js/malikania/js_window.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient-js/malikania/js_window.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -25,7 +25,7 @@ #include "js_rectangle.hpp" #include "js_window.hpp" -namespace malikania { +namespace mlk { namespace { @@ -287,4 +287,4 @@ duk_pop(ctx); } -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libclient-js/malikania/js_window.hpp --- a/libclient-js/malikania/js_window.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient-js/malikania/js_window.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -22,12 +22,12 @@ #include "duktape.hpp" #include "window.hpp" -namespace malikania { +namespace mlk { window& dukx_require_window(duk_context* ctx, duk_idx_t index); void dukx_load_window(duk_context* ctx); -} // !malikania +} // !mlk #endif // !MALIKANIA_JS_WINDOW_HPP diff -r a47a4477f347 -r fabbe1759cec libclient/malikania/animation.hpp --- a/libclient/malikania/animation.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient/malikania/animation.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -31,7 +31,7 @@ #include "sprite.hpp" -namespace malikania { +namespace mlk { class window; @@ -87,8 +87,8 @@ */ class animation { private: - malikania::sprite m_sprite; - malikania::animation_frames m_frames; + mlk::sprite m_sprite; + mlk::animation_frames m_frames; public: /** @@ -97,7 +97,7 @@ * \param sprite the sprite image * \param frames the frames to show */ - inline animation(malikania::sprite sprite, animation_frames frames) noexcept + inline animation(mlk::sprite sprite, animation_frames frames) noexcept : m_sprite(std::move(sprite)) , m_frames(std::move(frames)) { @@ -108,7 +108,7 @@ * * \return the sprite */ - inline const malikania::sprite& sprite() const noexcept + inline const mlk::sprite& sprite() const noexcept { return m_sprite; } @@ -118,7 +118,7 @@ * * \return the sprite */ - inline malikania::sprite& sprite() noexcept + inline mlk::sprite& sprite() noexcept { return m_sprite; } @@ -148,6 +148,6 @@ } }; -} // !malikania +} // !mlk #endif // !MALIKANIA_ANIMATION_HPP diff -r a47a4477f347 -r fabbe1759cec libclient/malikania/animator.cpp --- a/libclient/malikania/animator.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient/malikania/animator.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -19,7 +19,7 @@ #include "animation.hpp" #include "animator.hpp" -namespace malikania { +namespace mlk { animator::animator(animation& animation) noexcept : m_animation(animation) @@ -49,4 +49,4 @@ m_animation.sprite().draw(window, m_current, point); } -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libclient/malikania/animator.hpp --- a/libclient/malikania/animator.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient/malikania/animator.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -26,7 +26,7 @@ * \brief Draw animations. */ -namespace malikania { +namespace mlk { class animation; class point; @@ -69,6 +69,6 @@ void draw(window& window, const point& position); }; -} // !malikania +} // !mlk #endif // !MALIKANIA_ANIMATOR_HPP diff -r a47a4477f347 -r fabbe1759cec libclient/malikania/backend/sdl/font_backend.cpp --- a/libclient/malikania/backend/sdl/font_backend.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient/malikania/backend/sdl/font_backend.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -25,7 +25,7 @@ using namespace std::string_literals; -namespace malikania { +namespace mlk { font::backend_impl::backend_impl(std::string data, unsigned size) : m_font(nullptr, nullptr) @@ -43,7 +43,7 @@ } } -size font::backend_impl::clip(const malikania::font&, const std::string& text) const +size font::backend_impl::clip(const mlk::font&, const std::string& text) const { int width, height; @@ -51,7 +51,7 @@ throw std::runtime_error(SDL_GetError()); } - return malikania::size(static_cast(width), static_cast(height)); + return mlk::size(static_cast(width), static_cast(height)); } -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libclient/malikania/backend/sdl/font_backend.hpp --- a/libclient/malikania/backend/sdl/font_backend.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient/malikania/backend/sdl/font_backend.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -26,7 +26,7 @@ #include -namespace malikania { +namespace mlk { class font; class size; @@ -43,9 +43,9 @@ return m_font.get(); } - malikania::size clip(const malikania::font& self, const std::string& text) const; + mlk::size clip(const mlk::font& self, const std::string& text) const; }; -} // !malikania +} // !mlk #endif // !MALIKANIA_FONT_BACKEND_HPP diff -r a47a4477f347 -r fabbe1759cec libclient/malikania/backend/sdl/image_backend.cpp --- a/libclient/malikania/backend/sdl/image_backend.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient/malikania/backend/sdl/image_backend.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -25,7 +25,7 @@ using namespace std::string_literals; -namespace malikania { +namespace mlk { void image::backend_impl::create_texture(window& window) { @@ -55,7 +55,7 @@ throw std::runtime_error(SDL_GetError()); } - m_size = malikania::size( + m_size = mlk::size( static_cast(m_surface->w), static_cast(m_surface->h) ); @@ -116,4 +116,4 @@ } } -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libclient/malikania/backend/sdl/image_backend.hpp --- a/libclient/malikania/backend/sdl/image_backend.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient/malikania/backend/sdl/image_backend.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -26,7 +26,7 @@ #include #include -namespace malikania { +namespace mlk { class image; class point; @@ -38,7 +38,7 @@ std::unique_ptr m_surface; std::unique_ptr m_texture; - malikania::size m_size; + mlk::size m_size; void create_texture(window& window); @@ -50,7 +50,7 @@ return m_texture.get(); } - inline const malikania::size& size() const noexcept + inline const mlk::size& size() const noexcept { return m_size; } @@ -60,6 +60,6 @@ void draw(window& window, const rectangle& source, const rectangle& target); }; -} // !malikania +} // !mlk #endif // !MALIKANIA_IMAGE_BACKEND_HPP diff -r a47a4477f347 -r fabbe1759cec libclient/malikania/backend/sdl/window_backend.cpp --- a/libclient/malikania/backend/sdl/window_backend.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient/malikania/backend/sdl/window_backend.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -29,7 +29,7 @@ #include "font_backend.hpp" #include "window_backend.hpp" -namespace malikania { +namespace mlk { window::backend_impl::backend_impl(window&, unsigned width, unsigned height, const std::string& title) : m_window(nullptr, nullptr) @@ -267,4 +267,4 @@ { } -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libclient/malikania/backend/sdl/window_backend.hpp --- a/libclient/malikania/backend/sdl/window_backend.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient/malikania/backend/sdl/window_backend.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -26,7 +26,7 @@ #include -namespace malikania { +namespace mlk { class window::backend_impl { private: @@ -74,6 +74,6 @@ void draw_text(const std::string& text, font& font, const point& point); }; -} // !malikania +} // !mlk #endif // !MALIKANIA_WINDOW_BACKEND_HPP diff -r a47a4477f347 -r fabbe1759cec libclient/malikania/client_resources_loader.cpp --- a/libclient/malikania/client_resources_loader.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient/malikania/client_resources_loader.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -28,7 +28,7 @@ using boost::str; using boost::format; -namespace malikania { +namespace mlk { size client_resources_loader::require_size(const std::string& id, const nlohmann::json& object, @@ -131,4 +131,4 @@ return animation(std::move(sprite), std::move(frames)); } -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libclient/malikania/client_resources_loader.hpp --- a/libclient/malikania/client_resources_loader.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient/malikania/client_resources_loader.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -32,7 +32,7 @@ #include "size.hpp" #include "sprite.hpp" -namespace malikania { +namespace mlk { /** * \brief Load client resources. @@ -120,6 +120,6 @@ virtual animation load_animation(const std::string& id); }; -} // !malikania +} // !mlk #endif // !MALIKANIA_CLIENT_RESOURCES_LOADER_HPP diff -r a47a4477f347 -r fabbe1759cec libclient/malikania/color.cpp --- a/libclient/malikania/color.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient/malikania/color.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -22,7 +22,7 @@ #include "color.hpp" -namespace malikania { +namespace mlk { namespace { @@ -234,4 +234,4 @@ } } -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libclient/malikania/color.hpp --- a/libclient/malikania/color.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient/malikania/color.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -27,7 +27,7 @@ #include #include -namespace malikania { +namespace mlk { /** * \brief color description @@ -125,6 +125,6 @@ } }; -} // !malikania +} // !mlk #endif // !MALIKANIA_COLOR_HPP diff -r a47a4477f347 -r fabbe1759cec libclient/malikania/font.cpp --- a/libclient/malikania/font.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient/malikania/font.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -18,7 +18,7 @@ #include "font_backend.hpp" -namespace malikania { +namespace mlk { font::font(std::string data, unsigned size) : m_backend(std::make_unique(std::move(data), size)) @@ -37,4 +37,4 @@ font& font::operator=(font&& other) noexcept = default; -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libclient/malikania/font.hpp --- a/libclient/malikania/font.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient/malikania/font.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -29,7 +29,7 @@ #include "size.hpp" -namespace malikania { +namespace mlk { /** * \brief font object. @@ -98,7 +98,7 @@ * \param text the text to clip * \return the required size */ - malikania::size clip(const std::string& text) const; + mlk::size clip(const std::string& text) const; /** * Default move assignment operator. @@ -109,6 +109,6 @@ font& operator=(font&& other) noexcept; }; -} // !malikania +} // !mlk #endif // MALIKANIA_FONT_HPP diff -r a47a4477f347 -r fabbe1759cec libclient/malikania/image.cpp --- a/libclient/malikania/image.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient/malikania/image.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -18,7 +18,7 @@ #include "image_backend.hpp" -namespace malikania { +namespace mlk { image::image(std::string data) : m_backend(new backend_impl(*this, std::move(data))) @@ -29,7 +29,7 @@ image::~image() noexcept = default; -const malikania::size& image::size() const noexcept +const mlk::size& image::size() const noexcept { return m_backend->size(); } @@ -46,4 +46,4 @@ image& image::operator=(image&&) noexcept = default; -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libclient/malikania/image.hpp --- a/libclient/malikania/image.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient/malikania/image.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -31,7 +31,7 @@ #include "rectangle.hpp" #include "size.hpp" -namespace malikania { +namespace mlk { class window; @@ -90,7 +90,7 @@ * * \return the size */ - const malikania::size& size() const noexcept; + const mlk::size& size() const noexcept; /** * Draw the image to the window. @@ -118,6 +118,6 @@ image& operator=(image&& image) noexcept; }; -} // !malikania +} // !mlk #endif // !MALIKANIA_IMAGE_HPP diff -r a47a4477f347 -r fabbe1759cec libclient/malikania/line.hpp --- a/libclient/malikania/line.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient/malikania/line.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -24,7 +24,7 @@ * \brief line description. */ -namespace malikania { +namespace mlk { /** * \brief line description. @@ -120,6 +120,6 @@ return !(l1 == l2); } -} // !malikania +} // !mlk #endif // !MALIKANIA_LINE_HPP diff -r a47a4477f347 -r fabbe1759cec libclient/malikania/point.hpp --- a/libclient/malikania/point.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient/malikania/point.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -24,7 +24,7 @@ * \brief point description. */ -namespace malikania { +namespace mlk { /** * \brief point coordinate. @@ -92,6 +92,6 @@ return !(p1 == p2); } -} // !malikania +} // !mlk #endif // !MALIKANIA_POINT_HPP diff -r a47a4477f347 -r fabbe1759cec libclient/malikania/rectangle.hpp --- a/libclient/malikania/rectangle.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient/malikania/rectangle.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -24,7 +24,7 @@ * \brief rectangle description. */ -namespace malikania { +namespace mlk { /** * \brief rectangle description. @@ -133,6 +133,6 @@ return !(r1 == r2); } -} // !malikania +} // !mlk #endif // !MALIKANIA_RECTANGLE_HPP diff -r a47a4477f347 -r fabbe1759cec libclient/malikania/size.hpp --- a/libclient/malikania/size.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient/malikania/size.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -19,7 +19,7 @@ #ifndef MALIKANIA_SIZE_HPP #define MALIKANIA_SIZE_HPP -namespace malikania { +namespace mlk { /** * \brief size description. @@ -97,6 +97,6 @@ return !(s1 == s2); } -} // !malikania +} // !mlk #endif // !MALIKANIA_SIZE_HPP diff -r a47a4477f347 -r fabbe1759cec libclient/malikania/sprite.cpp --- a/libclient/malikania/sprite.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient/malikania/sprite.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -20,13 +20,13 @@ #include "sprite.hpp" -namespace malikania { +namespace mlk { -sprite::sprite(malikania::image image, - malikania::size cell, - malikania::size size, - malikania::size space, - malikania::size margin) noexcept +sprite::sprite(mlk::image image, + mlk::size cell, + mlk::size size, + mlk::size space, + mlk::size margin) noexcept : m_image(std::move(image)) , m_cell(std::move(cell)) , m_margin(std::move(margin)) @@ -64,4 +64,4 @@ m_image.draw(window, source, target); } -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libclient/malikania/sprite.hpp --- a/libclient/malikania/sprite.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient/malikania/sprite.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -26,18 +26,18 @@ #include "image.hpp" -namespace malikania { +namespace mlk { /** * \brief A Sprite is an image divided into cells. */ class sprite { private: - malikania::image m_image; - malikania::size m_cell; - malikania::size m_margin; - malikania::size m_space; - malikania::size m_size; + mlk::image m_image; + mlk::size m_cell; + mlk::size m_margin; + mlk::size m_space; + mlk::size m_size; unsigned m_rows; unsigned m_columns; @@ -52,18 +52,18 @@ * \param space the optional space between cells * \param size the sprite size (if 0, taken from the image) */ - sprite(malikania::image image, - malikania::size cell, - malikania::size margin = { 0, 0 }, - malikania::size space = { 0, 0 }, - malikania::size size = { 0, 0 }) noexcept; + sprite(mlk::image image, + mlk::size cell, + mlk::size margin = { 0, 0 }, + mlk::size space = { 0, 0 }, + mlk::size size = { 0, 0 }) noexcept; /** * Get the underlying image. * * \return the image */ - inline const malikania::image& image() const noexcept + inline const mlk::image& image() const noexcept { return m_image; } @@ -73,7 +73,7 @@ * * \return the image */ - inline malikania::image& image() noexcept + inline mlk::image& image() noexcept { return m_image; } @@ -139,6 +139,6 @@ void draw(window& window, unsigned cell, const point& position); }; -} // !malikania +} // !mlk #endif // !MALIKANIA_SPRITE_HPP diff -r a47a4477f347 -r fabbe1759cec libclient/malikania/window.cpp --- a/libclient/malikania/window.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient/malikania/window.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -21,7 +21,7 @@ #include "color.hpp" #include "window_backend.hpp" -namespace malikania { +namespace mlk { window::window(unsigned width, unsigned height, const std::string& title) : m_backend(std::make_unique(*this, width, height, title)) @@ -115,4 +115,4 @@ window& window::operator=(window&&) noexcept = default; -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libclient/malikania/window.hpp --- a/libclient/malikania/window.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libclient/malikania/window.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -29,7 +29,7 @@ #include #include -namespace malikania { +namespace mlk { class color; class line; @@ -223,6 +223,6 @@ window& operator=(window&&) noexcept; }; -} // !malikania +} // !mlk #endif // !MALIKANIA_WINDOW_HPP diff -r a47a4477f347 -r fabbe1759cec libcommon-js/malikania/js_elapsed_timer.cpp --- a/libcommon-js/malikania/js_elapsed_timer.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libcommon-js/malikania/js_elapsed_timer.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -23,7 +23,7 @@ #include "duktape.hpp" -namespace malikania { +namespace mlk { namespace { @@ -157,4 +157,4 @@ duk_pop(ctx); } -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libcommon-js/malikania/js_elapsed_timer.hpp --- a/libcommon-js/malikania/js_elapsed_timer.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libcommon-js/malikania/js_elapsed_timer.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -21,10 +21,10 @@ #include "duktape.hpp" -namespace malikania { +namespace mlk { void dukx_load_elapsedtimer(duk_context* ctx) noexcept; -} // !malikania +} // !mlk #endif // !MALIKANIA_JS_ELAPSED_TIMER_HPP diff -r a47a4477f347 -r fabbe1759cec libcommon-js/malikania/js_resources_loader.cpp --- a/libcommon-js/malikania/js_resources_loader.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libcommon-js/malikania/js_resources_loader.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -20,7 +20,7 @@ #include "js_resources_loader.hpp" -namespace malikania { +namespace mlk { namespace { @@ -51,4 +51,4 @@ return *static_cast(ptr); } -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libcommon-js/malikania/js_resources_loader.hpp --- a/libcommon-js/malikania/js_resources_loader.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libcommon-js/malikania/js_resources_loader.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -22,12 +22,12 @@ #include "duktape.hpp" #include "resources_loader.hpp" -namespace malikania { +namespace mlk { void dukx_put_loader(duk_context* ctx, resources_loader&); resources_loader& dukx_get_loader(duk_context* ctx); -} // !malikania +} // !mlk #endif // !MALIKANIA_JS_RESOURCES_LOADER_H diff -r a47a4477f347 -r fabbe1759cec libcommon/malikania/backend/sdl/sdl_util.cpp --- a/libcommon/malikania/backend/sdl/sdl_util.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libcommon/malikania/backend/sdl/sdl_util.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -23,7 +23,7 @@ #include "sdl_util.hpp" -namespace malikania { +namespace mlk { namespace { @@ -145,4 +145,4 @@ return ops; } -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libcommon/malikania/backend/sdl/sdl_util.hpp --- a/libcommon/malikania/backend/sdl/sdl_util.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libcommon/malikania/backend/sdl/sdl_util.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -28,7 +28,7 @@ #include -namespace malikania { +namespace mlk { /** * Create a SDL_RWops that owns the binary data. @@ -46,6 +46,6 @@ */ SDL_RWops* SDLx_RWFromBinary(std::string data) noexcept; -} // !malikania +} // !mlk #endif // !MALIKANIA_COMMON_SDL_UTIL_HPP diff -r a47a4477f347 -r fabbe1759cec libcommon/malikania/game.hpp --- a/libcommon/malikania/game.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libcommon/malikania/game.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -28,7 +28,7 @@ #include #include -namespace malikania { +namespace mlk { /** * \brief Basic game description. @@ -42,6 +42,6 @@ std::string author; }; -} // !malikania +} // !mlk #endif // !MALIKANIA_GAME_HPP diff -r a47a4477f347 -r fabbe1759cec libcommon/malikania/id.hpp --- a/libcommon/malikania/id.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libcommon/malikania/id.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -29,7 +29,7 @@ #include #include -namespace malikania { +namespace mlk { template class id; @@ -154,6 +154,6 @@ */ using id64 = id; -} // !malikania +} // !mlk #endif // !MALIKANIA_COMMON_ID_HPP diff -r a47a4477f347 -r fabbe1759cec libcommon/malikania/resources_loader.cpp --- a/libcommon/malikania/resources_loader.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libcommon/malikania/resources_loader.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -24,7 +24,7 @@ #include "resources_loader.hpp" #include "resources_locator.hpp" -namespace malikania { +namespace mlk { void resources_loader::requires(const std::string& id, const nlohmann::json& object, @@ -105,4 +105,4 @@ value.count("author") > 0 ? value["author"] : ""}; } -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libcommon/malikania/resources_loader.hpp --- a/libcommon/malikania/resources_loader.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libcommon/malikania/resources_loader.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -26,7 +26,7 @@ #include "resources_locator.hpp" -namespace malikania { +namespace mlk { class game; @@ -109,6 +109,6 @@ virtual game load_game() const; }; -} // !malikania +} // !mlk #endif // !MALIKANIA_RESOURCES_LOADER_HPP diff -r a47a4477f347 -r fabbe1759cec libcommon/malikania/resources_locator.cpp --- a/libcommon/malikania/resources_locator.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libcommon/malikania/resources_locator.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -24,7 +24,7 @@ #include "resources_locator.hpp" -namespace malikania { +namespace mlk { directory_resources_locator::directory_resources_locator(std::string path) noexcept : m_path(std::move(path)) @@ -53,4 +53,4 @@ return ptr; } -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libcommon/malikania/resources_locator.hpp --- a/libcommon/malikania/resources_locator.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libcommon/malikania/resources_locator.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -23,7 +23,7 @@ #include #include -namespace malikania { +namespace mlk { /** * \brief Abstract assets locator. @@ -80,6 +80,6 @@ std::unique_ptr open(const std::string& id) override; }; -} // !malikania +} // !mlk #endif // !MALIKANIA_RESOURCES_LOCATOR_HPP diff -r a47a4477f347 -r fabbe1759cec libcommon/malikania/util.cpp --- a/libcommon/malikania/util.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libcommon/malikania/util.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -18,7 +18,7 @@ #include "util.hpp" -namespace malikania { +namespace mlk { namespace util { @@ -37,4 +37,4 @@ } // !util -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libcommon/malikania/util.hpp --- a/libcommon/malikania/util.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libcommon/malikania/util.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -28,7 +28,7 @@ #include #include -namespace malikania { +namespace mlk { namespace util { @@ -57,6 +57,6 @@ } // !util -} // !malikania +} // !mlk #endif // !MALIKANIA_UTIL_HPP diff -r a47a4477f347 -r fabbe1759cec libserver/malikania/account.hpp --- a/libserver/malikania/account.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libserver/malikania/account.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -27,7 +27,7 @@ #include #include -namespace malikania { +namespace mlk { /** * \brief Account model @@ -52,6 +52,6 @@ return !(ac1 == ac2); } -} // !malikania +} // !mlk #endif // !MALIKANIA_ACCOUNT_HPP diff -r a47a4477f347 -r fabbe1759cec libserver/malikania/account_dao.cpp --- a/libserver/malikania/account_dao.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libserver/malikania/account_dao.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -20,7 +20,7 @@ #include "account_dao.hpp" #include "database.hpp" -namespace malikania { +namespace mlk { using create_func = void (account&); using remove_func = void (const account&); @@ -65,4 +65,4 @@ m_database.handle().get("malikania_account_clear")(); } -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libserver/malikania/account_dao.hpp --- a/libserver/malikania/account_dao.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libserver/malikania/account_dao.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -27,7 +27,7 @@ #include #include -namespace malikania { +namespace mlk { class database; class account; @@ -110,6 +110,6 @@ void clear(); }; -} // !malikania +} // !mlk #endif // !MALIKANIA_SERVER_ACCOUNT_DAO_HPP diff -r a47a4477f347 -r fabbe1759cec libserver/malikania/database.cpp --- a/libserver/malikania/database.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libserver/malikania/database.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -18,7 +18,7 @@ #include "database.hpp" -namespace malikania { +namespace mlk { using load_func = void (const std::unordered_map&); using unload_func = void (); @@ -34,4 +34,4 @@ m_dso.get("malikania_driver_unload")(); } -} // !malikania +} // !mlk diff -r a47a4477f347 -r fabbe1759cec libserver/malikania/database.hpp --- a/libserver/malikania/database.hpp Tue Nov 29 21:21:36 2016 +0100 +++ b/libserver/malikania/database.hpp Tue Nov 29 22:25:17 2016 +0100 @@ -29,7 +29,7 @@ #include #include -namespace malikania { +namespace mlk { /** * \brief Generic database. @@ -76,6 +76,6 @@ } }; -} // !malikania +} // !mlk #endif // !MALIKANIA_DATABASE_HPP diff -r a47a4477f347 -r fabbe1759cec tests/libclient/animation/main.cpp --- a/tests/libclient/animation/main.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/tests/libclient/animation/main.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -28,18 +28,19 @@ #include #include +using namespace mlk; using namespace std::chrono_literals; namespace { -malikania::window window(400, 400); +window win(400, 400); } // !namespace class TestAnimation : public testing::Test { protected: - malikania::directory_resources_locator m_locator; - malikania::client_resources_loader m_loader; + directory_resources_locator m_locator; + client_resources_loader m_loader; public: TestAnimation() @@ -77,17 +78,17 @@ boost::timer::cpu_timer timer; try { - malikania::animation animation = m_loader.load_animation("animations/margins.json"); - malikania::animator animator(animation); + animation animation = m_loader.load_animation("animations/margins.json"); + animator animator(animation); auto x = (400 / 2) - (animation.sprite().cell().width() / 2); auto y = (400 / 2) - (animation.sprite().cell().height() / 2); while (timer.elapsed().wall / 1000000LL < 8000) { - window.clear(); - animator.draw(window, malikania::point(x, y)); + win.clear(); + animator.draw(win, point(x, y)); animator.update(); - window.present(); + win.present(); } } catch (const std::exception &ex) { FAIL() << ex.what(); diff -r a47a4477f347 -r fabbe1759cec tests/libclient/color/main.cpp --- a/tests/libclient/color/main.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/tests/libclient/color/main.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -20,7 +20,7 @@ #include -using namespace malikania; +using namespace mlk; /* * Separate arguments diff -r a47a4477f347 -r fabbe1759cec tests/libclient/font/main.cpp --- a/tests/libclient/font/main.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/tests/libclient/font/main.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -30,8 +30,6 @@ using namespace std::chrono_literals; -namespace mlk = malikania; - namespace { mlk::window window(400, 400); diff -r a47a4477f347 -r fabbe1759cec tests/libclient/image/main.cpp --- a/tests/libclient/image/main.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/tests/libclient/image/main.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -26,8 +26,6 @@ #include #include -namespace mlk = malikania; - using namespace std::chrono_literals; namespace { diff -r a47a4477f347 -r fabbe1759cec tests/libclient/js-animation/main.cpp --- a/tests/libclient/js-animation/main.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/tests/libclient/js-animation/main.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -27,8 +27,6 @@ #include #include -namespace mlk = malikania; - using namespace std::chrono_literals; class TestAnimation : public testing::Test { diff -r a47a4477f347 -r fabbe1759cec tests/libclient/js-color/main.cpp --- a/tests/libclient/js-color/main.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/tests/libclient/js-color/main.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -20,8 +20,6 @@ #include -using namespace malikania; - class TestColor : public testing::Test { protected: UniqueContext m_ctx; @@ -31,7 +29,7 @@ { duk_push_object(m_ctx); duk_put_global_string(m_ctx, "Malikania"); - dukx_load_color(m_ctx); + mlk::dukx_load_color(m_ctx); } int component(const char *name) @@ -487,7 +485,7 @@ { try { duk_push_c_function(m_ctx, [] (auto ctx) { - auto color = dukx_require_color(ctx, 0); + auto color = mlk::dukx_require_color(ctx, 0); duk_push_uint(ctx, color.red()); duk_put_global_string(ctx, "r"); @@ -528,7 +526,7 @@ { try { duk_push_c_function(m_ctx, [] (auto ctx) { - dukx_require_color(ctx, 0); + mlk::dukx_require_color(ctx, 0); return 0; }, 1); @@ -561,7 +559,7 @@ { try { duk_push_c_function(m_ctx, [] (auto ctx) { - dukx_require_color(ctx, 0); + mlk::dukx_require_color(ctx, 0); return 0; }, 1); @@ -601,7 +599,7 @@ { try { duk_push_c_function(m_ctx, [] (auto ctx) { - auto color = dukx_get_color(ctx, 0); + auto color = mlk::dukx_get_color(ctx, 0); duk_push_uint(ctx, color.red()); duk_put_global_string(ctx, "r"); @@ -642,7 +640,7 @@ { try { duk_push_c_function(m_ctx, [] (auto ctx) { - auto color = dukx_get_color(ctx, 0); + auto color = mlk::dukx_get_color(ctx, 0); duk_push_uint(ctx, color.red()); duk_put_global_string(ctx, "r"); @@ -683,7 +681,7 @@ { try { duk_push_c_function(m_ctx, [] (auto ctx) { - auto color = dukx_get_color(ctx, 0); + auto color = mlk::dukx_get_color(ctx, 0); duk_push_uint(ctx, color.red()); duk_put_global_string(ctx, "r"); @@ -724,7 +722,7 @@ { try { duk_push_c_function(m_ctx, [] (auto ctx) { - auto color = dukx_get_color(ctx, 0); + auto color = mlk::dukx_get_color(ctx, 0); duk_push_uint(ctx, color.red()); duk_put_global_string(ctx, "r"); diff -r a47a4477f347 -r fabbe1759cec tests/libclient/js-font/main.cpp --- a/tests/libclient/js-font/main.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/tests/libclient/js-font/main.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -26,8 +26,6 @@ #include #include -namespace mlk = malikania; - using namespace std::chrono_literals; class TestFont : public testing::Test { diff -r a47a4477f347 -r fabbe1759cec tests/libclient/js-image/main.cpp --- a/tests/libclient/js-image/main.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/tests/libclient/js-image/main.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -26,8 +26,6 @@ #include #include -namespace mlk = malikania; - using namespace std::chrono_literals; class TestImage : public testing::Test { diff -r a47a4477f347 -r fabbe1759cec tests/libclient/js-line/main.cpp --- a/tests/libclient/js-line/main.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/tests/libclient/js-line/main.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -20,8 +20,6 @@ #include -using namespace malikania; - class TestLine : public testing::Test { protected: UniqueContext m_ctx; @@ -31,7 +29,7 @@ { duk_push_object(m_ctx); duk_put_global_string(m_ctx, "Malikania"); - dukx_load_line(m_ctx); + mlk::dukx_load_line(m_ctx); } }; @@ -209,7 +207,7 @@ { try { duk_push_c_function(m_ctx, [] (auto ctx) { - auto line = dukx_require_line(ctx, 0); + auto line = mlk::dukx_require_line(ctx, 0); duk_push_int(ctx, line.x1()); duk_put_global_string(ctx, "x1"); @@ -251,7 +249,7 @@ { try { duk_push_c_function(m_ctx, [] (auto ctx) { - dukx_require_line(ctx, 0); + mlk::dukx_require_line(ctx, 0); return 0; }, 1); @@ -290,7 +288,7 @@ { try { duk_push_c_function(m_ctx, [] (auto ctx) { - auto line = dukx_get_line(ctx, 0); + auto line = mlk::dukx_get_line(ctx, 0); duk_push_int(ctx, line.x1()); duk_put_global_string(ctx, "x1"); diff -r a47a4477f347 -r fabbe1759cec tests/libclient/js-point/main.cpp --- a/tests/libclient/js-point/main.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/tests/libclient/js-point/main.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -20,8 +20,6 @@ #include -using namespace malikania; - class TestPoint : public testing::Test { protected: UniqueContext m_ctx; @@ -31,7 +29,7 @@ { duk_push_object(m_ctx); duk_put_global_string(m_ctx, "Malikania"); - dukx_load_point(m_ctx); + mlk::dukx_load_point(m_ctx); } }; @@ -177,7 +175,7 @@ { try { duk_push_c_function(m_ctx, [] (auto ctx) { - auto point = dukx_require_point(ctx, 0); + auto point = mlk::dukx_require_point(ctx, 0); duk_push_int(ctx, point.x()); duk_put_global_string(ctx, "x"); @@ -209,7 +207,7 @@ { try { duk_push_c_function(m_ctx, [] (auto ctx) { - dukx_require_point(ctx, 0); + mlk::dukx_require_point(ctx, 0); return 0; }, 1); @@ -248,7 +246,7 @@ { try { duk_push_c_function(m_ctx, [] (auto ctx) { - auto point = dukx_get_point(ctx, 0); + auto point = mlk::dukx_get_point(ctx, 0); duk_push_int(ctx, point.x()); duk_put_global_string(ctx, "x"); diff -r a47a4477f347 -r fabbe1759cec tests/libclient/js-rectangle/main.cpp --- a/tests/libclient/js-rectangle/main.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/tests/libclient/js-rectangle/main.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -20,8 +20,6 @@ #include -using namespace malikania; - class TestRectangle : public testing::Test { protected: UniqueContext m_ctx; @@ -31,7 +29,7 @@ { duk_push_object(m_ctx); duk_put_global_string(m_ctx, "Malikania"); - dukx_load_rect(m_ctx); + mlk::dukx_load_rect(m_ctx); } }; @@ -236,7 +234,7 @@ { try { duk_push_c_function(m_ctx, [] (auto ctx) { - auto rect = dukx_require_rect(ctx, 0); + auto rect = mlk::dukx_require_rect(ctx, 0); duk_push_int(ctx, rect.x()); duk_put_global_string(ctx, "x"); @@ -278,7 +276,7 @@ { try { duk_push_c_function(m_ctx, [] (auto ctx) { - dukx_require_rect(ctx, 0); + mlk::dukx_require_rect(ctx, 0); return 0; }, 1); @@ -317,7 +315,7 @@ { try { duk_push_c_function(m_ctx, [] (auto ctx) { - auto rect = dukx_get_rect(ctx, 0); + auto rect = mlk::dukx_get_rect(ctx, 0); duk_push_int(ctx, rect.x()); duk_put_global_string(ctx, "x"); diff -r a47a4477f347 -r fabbe1759cec tests/libclient/js-size/main.cpp --- a/tests/libclient/js-size/main.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/tests/libclient/js-size/main.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -20,7 +20,7 @@ #include -using namespace malikania; +using namespace mlk; class TestSize : public testing::Test { protected: diff -r a47a4477f347 -r fabbe1759cec tests/libclient/js-sprite/main.cpp --- a/tests/libclient/js-sprite/main.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/tests/libclient/js-sprite/main.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -27,14 +27,14 @@ #include #include -namespace mlk = malikania; +using namespace mlk; using namespace std::chrono_literals; class TestSprite : public testing::Test { protected: - mlk::directory_resources_locator m_locator; - mlk::client_resources_loader m_loader; + directory_resources_locator m_locator; + client_resources_loader m_loader; UniqueContext m_ctx; public: diff -r a47a4477f347 -r fabbe1759cec tests/libclient/js-window/main.cpp --- a/tests/libclient/js-window/main.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/tests/libclient/js-window/main.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -23,8 +23,7 @@ #include -namespace mlk = malikania; - +using namespace mlk; using namespace std::chrono_literals; class TestWindow : public testing::Test { diff -r a47a4477f347 -r fabbe1759cec tests/libclient/line/main.cpp --- a/tests/libclient/line/main.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/tests/libclient/line/main.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -20,8 +20,6 @@ #include -namespace mlk = malikania; - TEST(Basics, none) { mlk::line line; diff -r a47a4477f347 -r fabbe1759cec tests/libclient/point/main.cpp --- a/tests/libclient/point/main.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/tests/libclient/point/main.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -20,8 +20,6 @@ #include -namespace mlk = malikania; - TEST(Basics, none) { mlk::point point; diff -r a47a4477f347 -r fabbe1759cec tests/libclient/rectangle/main.cpp --- a/tests/libclient/rectangle/main.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/tests/libclient/rectangle/main.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -20,8 +20,6 @@ #include -namespace mlk = malikania; - TEST(Basics, none) { mlk::rectangle rectangle; diff -r a47a4477f347 -r fabbe1759cec tests/libclient/size/main.cpp --- a/tests/libclient/size/main.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/tests/libclient/size/main.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -20,8 +20,6 @@ #include -namespace mlk = malikania; - TEST(Basics, none) { mlk::size size; diff -r a47a4477f347 -r fabbe1759cec tests/libclient/sprite/main.cpp --- a/tests/libclient/sprite/main.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/tests/libclient/sprite/main.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -27,8 +27,6 @@ #include #include -namespace mlk = malikania; - using namespace std::chrono_literals; namespace { diff -r a47a4477f347 -r fabbe1759cec tests/libcommon/js-elapsed-timer/main.cpp --- a/tests/libcommon/js-elapsed-timer/main.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/tests/libcommon/js-elapsed-timer/main.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -22,8 +22,7 @@ #include -namespace mlk = malikania; - +using namespace mlk; using namespace std::chrono_literals; /* diff -r a47a4477f347 -r fabbe1759cec tests/libcommon/util/main.cpp --- a/tests/libcommon/util/main.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/tests/libcommon/util/main.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -20,7 +20,7 @@ #include -using namespace malikania; +using namespace mlk; /* * util::clamp diff -r a47a4477f347 -r fabbe1759cec tests/libserver/dao-account/main.cpp --- a/tests/libserver/dao-account/main.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/tests/libserver/dao-account/main.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -26,7 +26,7 @@ #include #include -namespace mlk = malikania; +using namespace mlk; #include "test-sqlite.hpp" diff -r a47a4477f347 -r fabbe1759cec tests/libserver/id/main.cpp --- a/tests/libserver/id/main.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/tests/libserver/id/main.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -23,7 +23,7 @@ #include -using namespace malikania; +using namespace mlk; /* * Basic use case.