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
d7075282
Commit
d7075282
authored
Jan 20, 2013
by
Davis King
Browse files
Changed general_hash so it uses dlib::hash to hash integers rather
than returning them unmodified.
parent
6391a034
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
dlib/general_hash/general_hash.h
dlib/general_hash/general_hash.h
+2
-3
No files found.
dlib/general_hash/general_hash.h
View file @
d7075282
...
@@ -26,7 +26,6 @@ namespace dlib
...
@@ -26,7 +26,6 @@ namespace dlib
const
T
&
item
const
T
&
item
)
const
;
)
const
;
};
};
/*!
/*!
Note that the default behavior of general hash is to attempt to cast
Note that the default behavior of general hash is to attempt to cast
an object of type T to an unsigned long and use that as the hash.
an object of type T to an unsigned long and use that as the hash.
...
@@ -55,8 +54,8 @@ namespace dlib
...
@@ -55,8 +54,8 @@ namespace dlib
const
T
&
item
const
T
&
item
)
const
)
const
{
{
// hash any types that have a conversion to u
nsigned long
// hash any types that have a conversion to u
int64
return
static_cast
<
u
nsigned
long
>
(
item
);
return
hash
(
static_cast
<
u
int64
>
(
item
)
)
;
}
}
...
...
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