From 09b056975dacd1f0f815ad820b6dc9913b0118a3 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 23 Jun 2020 18:55:43 -0400 Subject: fix pointer style to match the style guide We do this in a lot of places, but we're inconsistent. Normalize the code to the Google C++ style guide. Change-Id: Ic2aceab661ce8f6b993dda21b1cdf5d2198dcbbf Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2262932 Reviewed-by: Sterling Augustine Reviewed-by: Mark Mentovai --- src/processor/map_serializers.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/processor/map_serializers.h') diff --git a/src/processor/map_serializers.h b/src/processor/map_serializers.h index a0b9d3fd..3d504158 100644 --- a/src/processor/map_serializers.h +++ b/src/processor/map_serializers.h @@ -53,20 +53,20 @@ template class StdMapSerializer { public: // Calculate the memory size of serialized data. - size_t SizeOf(const std::map &m) const; + size_t SizeOf(const std::map& m) const; // Writes the serialized data to memory with start address = dest, // and returns the "end" of data, i.e., return the address follow the final // byte of data. // NOTE: caller has to allocate enough memory before invoke Write() method. - char* Write(const std::map &m, char* dest) const; + char* Write(const std::map& m, char* dest) const; // Serializes a std::map object into a chunk of memory data with format // described in "StaticMap.h" comment. // Returns a pointer to the serialized data. If size != NULL, *size is set // to the size of serialized data, i.e., SizeOf(m). // Caller has the ownership of memory allocated as "new char[]". - char* Serialize(const std::map &m, unsigned int *size) const; + char* Serialize(const std::map& m, unsigned int* size) const; private: SimpleSerializer key_serializer_; @@ -79,14 +79,14 @@ template class AddressMapSerializer { public: // Calculate the memory size of serialized data. - size_t SizeOf(const AddressMap &m) const { + size_t SizeOf(const AddressMap& m) const { return std_map_serializer_.SizeOf(m.map_); } // Write the serialized data to specified memory location. Return the "end" // of data, i.e., return the address after the final byte of data. // NOTE: caller has to allocate enough memory before invoke Write() method. - char* Write(const AddressMap &m, char *dest) const { + char* Write(const AddressMap& m, char* dest) const { return std_map_serializer_.Write(m.map_, dest); } @@ -94,7 +94,7 @@ class AddressMapSerializer { // Returns a pointer to the serialized data. If size != NULL, *size is set // to the size of serialized data, i.e., SizeOf(m). // Caller has the ownership of memory allocated as "new char[]". - char* Serialize(const AddressMap &m, unsigned int *size) const { + char* Serialize(const AddressMap& m, unsigned int* size) const { return std_map_serializer_.Serialize(m.map_, size); } @@ -110,18 +110,18 @@ template class RangeMapSerializer { public: // Calculate the memory size of serialized data. - size_t SizeOf(const RangeMap &m) const; + size_t SizeOf(const RangeMap& m) const; // Write the serialized data to specified memory location. Return the "end" // of data, i.e., return the address after the final byte of data. // NOTE: caller has to allocate enough memory before invoke Write() method. - char* Write(const RangeMap &m, char* dest) const; + char* Write(const RangeMap& m, char* dest) const; // Serializes a RangeMap object into a chunk of memory data. // Returns a pointer to the serialized data. If size != NULL, *size is set // to the size of serialized data, i.e., SizeOf(m). // Caller has the ownership of memory allocated as "new char[]". - char* Serialize(const RangeMap &m, unsigned int *size) const; + char* Serialize(const RangeMap& m, unsigned int* size) const; private: // Convenient type name for Range. @@ -139,20 +139,20 @@ template class ContainedRangeMapSerializer { public: // Calculate the memory size of serialized data. - size_t SizeOf(const ContainedRangeMap *m) const; + size_t SizeOf(const ContainedRangeMap* m) const; // Write the serialized data to specified memory location. Return the "end" // of data, i.e., return the address after the final byte of data. // NOTE: caller has to allocate enough memory before invoke Write() method. - char* Write(const ContainedRangeMap *m, + char* Write(const ContainedRangeMap* m, char* dest) const; // Serializes a ContainedRangeMap object into a chunk of memory data. // Returns a pointer to the serialized data. If size != NULL, *size is set // to the size of serialized data, i.e., SizeOf(m). // Caller has the ownership of memory allocated as "new char[]". - char* Serialize(const ContainedRangeMap *m, - unsigned int *size) const; + char* Serialize(const ContainedRangeMap* m, + unsigned int* size) const; private: // Convenient type name for the underlying map type. -- cgit v1.2.1