Commit 18513aa6 authored by davis@blarg-a324a5a3e.localnet's avatar davis@blarg-a324a5a3e.localnet

merged

parents a9fd1348 dbd4ca21
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include <string> #include <string>
#include "hash.h"
namespace dlib namespace dlib
{ {
...@@ -68,11 +69,7 @@ namespace dlib ...@@ -68,11 +69,7 @@ namespace dlib
const std::string& item const std::string& item
) const ) const
{ {
unsigned long hash = 0; return hash(item);
std::string::size_type size = item.size();
for (std::string::size_type i = 0; i < size; ++i)
hash = hash*37 + static_cast<unsigned long>(item[i]);
return hash;
} }
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
......
...@@ -280,6 +280,9 @@ ...@@ -280,6 +280,9 @@
<term file="containers.html" name="map"/> <term file="containers.html" name="map"/>
<term file="dlib/matrix/matrix_data_layout_abstract.h.html" name="row_major_layout"/>
<term file="dlib/matrix/matrix_data_layout_abstract.h.html" name="column_major_layout"/>
<term file="dlib/matrix/matrix_exp_abstract.h.html" name="matrix_exp"/> <term file="dlib/matrix/matrix_exp_abstract.h.html" name="matrix_exp"/>
<term file="dlib/matrix/matrix_abstract.h.html" name="const_temp_matrix"/> <term file="dlib/matrix/matrix_abstract.h.html" name="const_temp_matrix"/>
......
...@@ -40,8 +40,8 @@ int main(int argc, char** argv) ...@@ -40,8 +40,8 @@ int main(int argc, char** argv)
array2d<rgb_pixel> img; array2d<rgb_pixel> img;
// Now load the image file into our image. If something is wrong then // Now load the image file into our image. If something is wrong then
// load_image() will throw an exception. Also, if you compiled with libpng // load_image() will throw an exception. Also, if you linked with libpng
// and libjpeg then load_image() can also load PNG and JPEG files in addition // and libjpeg then load_image() can load PNG and JPEG files in addition
// to BMP files. // to BMP files.
load_image(img, argv[1]); load_image(img, argv[1]);
......
...@@ -46,8 +46,8 @@ int main(int argc, char** argv) ...@@ -46,8 +46,8 @@ int main(int argc, char** argv)
array2d<rgb_pixel> img; array2d<rgb_pixel> img;
// Now load the image file into our image. If something is wrong then // Now load the image file into our image. If something is wrong then
// load_image() will throw an exception. Also, if you compiled with libpng // load_image() will throw an exception. Also, if you linked with libpng
// and libjpeg then load_image() can also load PNG and JPEG files in addition // and libjpeg then load_image() can load PNG and JPEG files in addition
// to BMP files. // to BMP files.
load_image(img, argv[1]); load_image(img, argv[1]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment