Merge branch 'master' into image-readers

This commit is contained in:
artemp
2014-11-07 11:50:33 +00:00
2 changed files with 13 additions and 3 deletions

View File

@@ -14,7 +14,16 @@
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'GCC_ENABLE_CPP_RTTI':'YES',
'OTHER_CPLUSPLUSFLAGS': [ '-Werror', '-Wall', '-Wextra', '-Wshadow', '-Wno-variadic-macros', '-frtti', '-fexceptions' ],
'OTHER_CPLUSPLUSFLAGS': [
'-Werror',
'-Wall',
'-Wextra',
'-Wshadow',
'-Wno-variadic-macros',
'-frtti',
'-fexceptions',
'-Wno-error=unused-parameter',
],
'GCC_WARN_PEDANTIC': 'YES',
'GCC_WARN_UNINITIALIZED_AUTOS': 'YES_AGGRESSIVE',
},
@@ -23,6 +32,7 @@
'cflags_cc': [
'-Wno-unknown-pragmas', # We are using '#pragma mark', but it is only available on Darwin.
'-Wno-literal-suffix', # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61653
'-Wno-error=unused-parameter',
],
}],
],

View File

@@ -93,8 +93,8 @@ Image::Image(const std::string &source_data) {
return;
}
width = CGImageGetWidth(image);
height = CGImageGetHeight(image);
width = uint32_t(CGImageGetWidth(image));
height = uint32_t(CGImageGetHeight(image));
CGRect rect = {{ 0, 0 }, { static_cast<CGFloat>(width), static_cast<CGFloat>(height) }};
img = ::std::unique_ptr<char[]>(new char[width * height * 4]());