Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
d7075282
Commit
d7075282
authored
Jan 21, 2013
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed general_hash so it uses dlib::hash to hash integers rather
than returning them unmodified.
parent
6391a034
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
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
<
unsigned
long
>
(
item
);
return
hash
(
static_cast
<
uint64
>
(
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