projects
/
platform
/
upstream
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
abe2c2f
)
Fixed Android build warning
author
Andrey Kamaev
<no@email>
Sun, 11 Mar 2012 10:53:42 +0000
(10:53 +0000)
committer
Andrey Kamaev
<no@email>
Sun, 11 Mar 2012 10:53:42 +0000
(10:53 +0000)
modules/contrib/src/rgbdodometry.cpp
patch
|
blob
|
history
diff --git
a/modules/contrib/src/rgbdodometry.cpp
b/modules/contrib/src/rgbdodometry.cpp
index
2ec4c01
..
decca23
100644
(file)
--- a/
modules/contrib/src/rgbdodometry.cpp
+++ b/
modules/contrib/src/rgbdodometry.cpp
@@
-137,7
+137,8
@@
void set2shorts( int& dst, int short_v1, int short_v2 )
static inline
void get2shorts( int src, int& short_v1, int& short_v2 )
{
- unsigned short* ptr = reinterpret_cast<unsigned short*>(&src);
+ typedef union { int vint32; unsigned short vuint16[2]; } s32tou16;
+ const unsigned short* ptr = (reinterpret_cast<s32tou16*>(&src))->vuint16;
short_v1 = ptr[0];
short_v2 = ptr[1];
}