Made use of std::function

Former-commit-id: 17e7ebe528071c6399383089ac1c0d089faccc34
This commit is contained in:
Lynix
2014-04-20 14:06:29 +02:00
parent 20df395928
commit ff2bf98623
3 changed files with 6 additions and 4 deletions

View File

@@ -10,6 +10,7 @@
#include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/String.hpp>
#include <Nazara/Utility/Enums.hpp>
#include <functional>
#include <map>
class NzPixelFormat
@@ -17,8 +18,8 @@ class NzPixelFormat
friend class NzUtility;
public:
using ConvertFunction = nzUInt8* (*)(const nzUInt8* start, const nzUInt8* end, nzUInt8* dst);
using FlipFunction = void (*)(unsigned int width, unsigned int height, unsigned int depth, const nzUInt8* src, nzUInt8* dst);
using ConvertFunction = std::function<nzUInt8*(const nzUInt8* start, const nzUInt8* end, nzUInt8* dst)>;
using FlipFunction = std::function<void(unsigned int width, unsigned int height, unsigned int depth, const nzUInt8* src, nzUInt8* dst)>;
static bool Convert(nzPixelFormat srcFormat, nzPixelFormat dstFormat, const void* src, void* dst);
static bool Convert(nzPixelFormat srcFormat, nzPixelFormat dstFormat, const void* start, const void* end, void* dst);