summaryrefslogtreecommitdiffstats
path: root/src/cvutil.cpp
diff options
context:
space:
mode:
authorsagitario <sagitario@fc51e93f-b9fe-4711-8d8d-3ae870c5f7d8>2012-03-03 08:15:49 (GMT)
committersagitario <sagitario@fc51e93f-b9fe-4711-8d8d-3ae870c5f7d8>2012-03-03 08:15:49 (GMT)
commit6f47f877b7b29c6fe8169a5dd7bced5fd68e9b49 (patch)
tree9858da29076fa52e2fda1f9ab8ad16d86a40a047 /src/cvutil.cpp
parent839d6ecd6402d7e0f29ef02c4a25ef6904c23f38 (diff)
downloadcv2pdb-6f47f877b7b29c6fe8169a5dd7bced5fd68e9b49.zip
cv2pdb-6f47f877b7b29c6fe8169a5dd7bced5fd68e9b49.tar.gz
cv2pdb-6f47f877b7b29c6fe8169a5dd7bced5fd68e9b49.tar.bz2
tabify
Diffstat (limited to 'src/cvutil.cpp')
-rw-r--r--src/cvutil.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/cvutil.cpp b/src/cvutil.cpp
index 95e8ea3..b8ad78a 100644
--- a/src/cvutil.cpp
+++ b/src/cvutil.cpp
@@ -181,33 +181,33 @@ int numeric_leaf(int* value, const void* leaf)
int write_numeric_leaf(int value, void* leaf)
{
- if(value >= 0 && value < LF_NUMERIC)
- {
- *(unsigned short int*) leaf = (unsigned short) value;
- return 2;
- }
- unsigned short int* type = (unsigned short int*) leaf;
- leaf = type + 1;
- if (value >= -128 && value <= 127)
- {
- *type = LF_CHAR;
- *(char*) leaf = (char)value;
- return 3;
- }
- if (value >= -32768 && value <= 32767)
- {
- *type = LF_SHORT;
- *(short*) leaf = (short)value;
- return 4;
- }
- if (value >= 0 && value <= 65535)
- {
- *type = LF_USHORT;
- *(unsigned short*) leaf = (unsigned short)value;
- return 4;
- }
- *type = LF_LONG;
- *(long*) leaf = (long)value;
- return 6;
+ if(value >= 0 && value < LF_NUMERIC)
+ {
+ *(unsigned short int*) leaf = (unsigned short) value;
+ return 2;
+ }
+ unsigned short int* type = (unsigned short int*) leaf;
+ leaf = type + 1;
+ if (value >= -128 && value <= 127)
+ {
+ *type = LF_CHAR;
+ *(char*) leaf = (char)value;
+ return 3;
+ }
+ if (value >= -32768 && value <= 32767)
+ {
+ *type = LF_SHORT;
+ *(short*) leaf = (short)value;
+ return 4;
+ }
+ if (value >= 0 && value <= 65535)
+ {
+ *type = LF_USHORT;
+ *(unsigned short*) leaf = (unsigned short)value;
+ return 4;
+ }
+ *type = LF_LONG;
+ *(long*) leaf = (long)value;
+ return 6;
}