diff options
author | Florian Kriener <floriank@google.com> | 2016-04-05 10:34:31 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-04-05 10:34:31 +0000 |
commit | 74dc70cc2d2ca6c5fb1f9efbb396fae3f242ee36 (patch) | |
tree | 12cc68a2f5ddc84c3d87e2456cd3cba9df7bd98d | |
parent | 13a9d4bf04133f2384afb199dba8c7e5a7cb8013 (diff) | |
parent | 0b5085d950fa91d122b4e844b5da4e539732e621 (diff) | |
download | dng_sdk-74dc70cc2d2ca6c5fb1f9efbb396fae3f242ee36.tar.gz |
Fix type issues with int32 and timespec am: 41c8c9a am: 7ce5984
am: 0b5085d
* commit '0b5085d950fa91d122b4e844b5da4e539732e621':
Fix type issues with int32 and timespec
Change-Id: I124ff98eac84c4c4399c0e623f576fe48ce52ce8
-rw-r--r-- | source/dng_image.cpp | 24 | ||||
-rw-r--r-- | source/dng_pthread.h | 11 |
2 files changed, 20 insertions, 15 deletions
diff --git a/source/dng_image.cpp b/source/dng_image.cpp index ae99b9e..2026b9a 100644 --- a/source/dng_image.cpp +++ b/source/dng_image.cpp @@ -553,8 +553,8 @@ void dng_image::Get (dng_pixel_buffer &buffer, edgeOption, dng_rect (fBounds.t, fBounds.l, - fBounds.t + (int)repeatV, - fBounds.l + (int)repeatH), + fBounds.t + (int32)repeatV, + fBounds.l + (int32)repeatH), areaTL); } @@ -570,7 +570,7 @@ void dng_image::Get (dng_pixel_buffer &buffer, edgeOption, dng_rect (fBounds.t, areaTM.l, - fBounds.t + (int)repeatV, + fBounds.t + (int32)repeatV, areaTM.r), areaTM); @@ -586,8 +586,8 @@ void dng_image::Get (dng_pixel_buffer &buffer, GetEdge (buffer, edgeOption, dng_rect (fBounds.t, - fBounds.r - (int)repeatH, - fBounds.t + (int)repeatV, + fBounds.r - (int32)repeatH, + fBounds.t + (int32)repeatV, fBounds.r), areaTR); @@ -605,7 +605,7 @@ void dng_image::Get (dng_pixel_buffer &buffer, dng_rect (areaLM.t, fBounds.l, areaLM.b, - fBounds.l + (int)repeatH), + fBounds.l + (int32)repeatH), areaLM); } @@ -620,7 +620,7 @@ void dng_image::Get (dng_pixel_buffer &buffer, GetEdge (buffer, edgeOption, dng_rect (areaRM.t, - fBounds.r - (int)repeatH, + fBounds.r - (int32)repeatH, areaRM.b, fBounds.r), areaRM); @@ -636,10 +636,10 @@ void dng_image::Get (dng_pixel_buffer &buffer, GetEdge (buffer, edgeOption, - dng_rect (fBounds.b - (int)repeatV, + dng_rect (fBounds.b - (int32)repeatV, fBounds.l, fBounds.b, - fBounds.l + (int)repeatH), + fBounds.l + (int32)repeatH), areaBL); } @@ -653,7 +653,7 @@ void dng_image::Get (dng_pixel_buffer &buffer, GetEdge (buffer, edgeOption, - dng_rect (fBounds.b - (int)repeatV, + dng_rect (fBounds.b - (int32)repeatV, areaBM.l, fBounds.b, areaBM.r), @@ -670,8 +670,8 @@ void dng_image::Get (dng_pixel_buffer &buffer, GetEdge (buffer, edgeOption, - dng_rect (fBounds.b - (int)repeatV, - fBounds.r - (int)repeatH, + dng_rect (fBounds.b - (int32)repeatV, + fBounds.r - (int32)repeatH, fBounds.b, fBounds.r), areaBR); diff --git a/source/dng_pthread.h b/source/dng_pthread.h index 0a28a1b..2095321 100644 --- a/source/dng_pthread.h +++ b/source/dng_pthread.h @@ -53,6 +53,14 @@ #endif +// Use the standard "timespec" struct for VS2015 and above from <time.h>. Define +// "dng_timespec" as "timespec" otherwise. +#if _MSC_VER >= 1900 +#include <time.h> +#else +#define timespec dng_timespec +#endif + #ifdef __cplusplus extern "C" { @@ -67,7 +75,6 @@ struct dng_timespec { long tv_nsec; }; - typedef unsigned long dng_pthread_t; typedef struct dng_pthread_mutex_impl *dng_pthread_mutex_t; @@ -179,8 +186,6 @@ void dng_pthread_terminate(); #undef PTHREAD_ONCE_INIT #define PTHREAD_ONCE_INIT DNG_PTHREAD_ONCE_INIT -#define timespec dng_timespec - /* If it is defined on Windows, it probably has the wrong value... */ #if defined(WIN32) || !defined(ETIMEDOUT) #undef ETIMEDOUT |