dodge linking error with image_data on windows - refs #2396

This commit is contained in:
Dane Springmeyer 2014-08-28 20:52:18 -07:00
parent 6074e87bbb
commit 8e8bc6c745

View file

@ -21,14 +21,15 @@ int main(int argc, char** argv)
boost::optional<std::string> type; boost::optional<std::string> type;
try try
{ {
#if !defined(_MSC_VER)
mapnik::image_data_32 im(256,256); mapnik::image_data_32 im(256,256);
unsigned char* bytes = im.getBytes(); mapnik::image_data_32::pixel_type * data = im.getData();
mapnik::image_data_32 * im_ptr = new mapnik::image_data_32(im.width(),im.height(),static_cast<mapnik::image_data_32::pixel_type *>(bytes)); mapnik::image_data_32 * im_ptr = new mapnik::image_data_32(im.width(),im.height(),data);
unsigned char* same_bytes = im_ptr->getBytes(); mapnik::image_data_32::pixel_type * same_data = im_ptr->getData();
BOOST_TEST(bytes == same_bytes); BOOST_TEST(data == same_data);
delete im_ptr; delete im_ptr;
BOOST_TEST(bytes == same_bytes); BOOST_TEST(data == same_data);
#endif
BOOST_TEST(set_working_dir(args)); BOOST_TEST(set_working_dir(args));
#if defined(HAVE_JPEG) #if defined(HAVE_JPEG)