[1/4] XML writer: remove type_hasher and remaining comment

Message ID 20220121173005.3196387-2-gprocida@google.com
State New
Headers
Series small XML writer changes |

Commit Message

Giuliano Procida Jan. 21, 2022, 5:30 p.m. UTC
  The type_hasher functor is no longer used.

	* src/abg-writer.cc (type_hasher): Remove this unused functor.
	Remove a following comment referencing it.

Reviewed-by: Matthias Maennich <maennich@google.com>
Signed-off-by: Giuliano Procida <gprocida@google.com>
---
 src/abg-writer.cc | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)
  

Comments

Dodji Seketeli Feb. 25, 2022, 9:37 a.m. UTC | #1
Giuliano Procida <gprocida@google.com> a écrit:

> The type_hasher functor is no longer used.
>
> 	* src/abg-writer.cc (type_hasher): Remove this unused functor.
> 	Remove a following comment referencing it.
>
> Reviewed-by: Matthias Maennich <maennich@google.com>
> Signed-off-by: Giuliano Procida <gprocida@google.com>

Applied to master, thanks!

[...]

Cheers,
  

Patch

diff --git a/src/abg-writer.cc b/src/abg-writer.cc
index 24a1fd56..525f6682 100644
--- a/src/abg-writer.cc
+++ b/src/abg-writer.cc
@@ -107,18 +107,9 @@  public:
   }
 };
 
-/// A hashing functor that should be as fast as possible.
-struct type_hasher
-{
-  size_t
-  operator()(const type_base* t) const
-  {return hash_type(t);}
-}; // end struct type_hasher
-
 /// A convenience typedef for a map that associates a pointer to type
-/// to a string.  The pointer to type is hashed as fast as possible.
-typedef unordered_map<type_base*,
-		      interned_string> type_ptr_map;
+/// to a string.
+typedef unordered_map<type_base*, interned_string> type_ptr_map;
 
 // A convenience typedef for a set of type_base*.
 typedef std::unordered_set<const type_base*> type_ptr_set_type;