Revert unneeded fixes in flat_hash_map (#16907)
authorSebastian Messmer <messmer@fb.com>
Mon, 11 Feb 2019 20:29:47 +0000 (12:29 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 11 Feb 2019 21:28:25 +0000 (13:28 -0800)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/16907

The begin()/end() fix actually doesn't make sense, see my comment on https://github.com/skarupke/flat_hash_map/pull/8
This diff removes it.

Reviewed By: ezyang

Differential Revision: D13985779

fbshipit-source-id: f08b02c941069e2a4e728e02a19b65dc72f96b41

c10/util/flat_hash_map.h

index 2e46452..96da070 100644 (file)
@@ -1,6 +1,5 @@
 // Taken from https://github.com/skarupke/flat_hash_map/blob/2c4687431f978f02a3780e24b8b701d22aa32d9c/flat_hash_map.hpp
 // with fixes applied:
-// - https://github.com/skarupke/flat_hash_map/pull/8
 // - https://github.com/skarupke/flat_hash_map/pull/25
 // - https://github.com/skarupke/flat_hash_map/pull/26
 // - replace size_t with uint64_t to fix it for 32bit
@@ -522,7 +521,6 @@ public:
             if (it->has_value())
                 return { it };
         }
-        return end();
     }
     const_iterator begin() const
     {
@@ -531,7 +529,6 @@ public:
             if (it->has_value())
                 return { it };
         }
-        return end();
     }
     const_iterator cbegin() const
     {