fix GCC/MinGW compiler errors

This commit is contained in:
Jinhao 2015-10-17 16:15:57 +08:00
parent 23ed986932
commit 1326bae10f
2 changed files with 4 additions and 2 deletions

View File

@ -11,6 +11,7 @@
#endif
#include <stdio.h>
#include <csetjmp>
namespace nana
{
@ -22,7 +23,7 @@ namespace nana
struct error_mgr
{
struct ::jpeg_error_mgr pub;
jmp_buf setjmp_buf;
std::jmp_buf setjmp_buf;
};
public:
bool open(const nana::char_t* jpeg_file) override

View File

@ -19,6 +19,7 @@
#include <nana/paint/detail/image_process_provider.hpp>
#include <stdexcept>
#include <cstring>
namespace nana{ namespace paint
{
@ -657,7 +658,7 @@ namespace nana{ namespace paint
//16-bits RGB format under X is 565, under Windows is 555
#if defined(NANA_X11)
p->element.green = palette_6bits[(*px >> 5) & 0x3F];
p->element.blue = palette_[*px & 0x1F];
p->element.blue = palette[*px & 0x1F];
#else
p->element.green = palette[(*px >> 6) & 0x1F];
p->element.blue = palette[(*px >> 1) & 0x1F];