Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
0f419e18
"tests/git@developer.sourcefind.cn:OpenDAS/pytorch3d.git" did not exist on "9e57b994ca27738c019c798294b581fc8fdc8722"
Commit
0f419e18
authored
Nov 24, 2012
by
Davis King
Browse files
Fixed compiler warning in gcc 4.4
parent
52aeba58
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
dlib/test/hash.cpp
dlib/test/hash.cpp
+7
-1
No files found.
dlib/test/hash.cpp
View file @
0f419e18
...
@@ -121,11 +121,17 @@ namespace
...
@@ -121,11 +121,17 @@ namespace
};
};
bo
.
host_to_little
(
buf
);
bo
.
host_to_little
(
buf
);
// Copy buf into a char buf to avoid warnings about violation of strict
// aliasing when calling murmur_hash3_128bit().
char
buf2
[
sizeof
(
buf
)];
memcpy
(
buf2
,
buf
,
sizeof
(
buf
));
std
::
pair
<
uint64
,
uint64
>
temp1
,
temp2
;
std
::
pair
<
uint64
,
uint64
>
temp1
,
temp2
;
// Make sure the 4 integer version of murmur hash does the same thing
// Make sure the 4 integer version of murmur hash does the same thing
// as the memory block version.
// as the memory block version.
temp1
=
murmur_hash3_128bit
(
buf
,
sizeof
(
buf
),
0
);
temp1
=
murmur_hash3_128bit
(
buf
2
,
sizeof
(
buf
2
),
0
);
temp2
=
murmur_hash3_128bit
(
buf
[
0
],
buf
[
1
],
buf
[
2
],
buf
[
3
]);
temp2
=
murmur_hash3_128bit
(
buf
[
0
],
buf
[
1
],
buf
[
2
],
buf
[
3
]);
DLIB_TEST
(
temp1
.
first
==
temp2
.
first
);
DLIB_TEST
(
temp1
.
first
==
temp2
.
first
);
DLIB_TEST
(
temp1
.
second
==
temp2
.
second
);
DLIB_TEST
(
temp1
.
second
==
temp2
.
second
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment