aboutsummaryrefslogtreecommitdiff
path: root/src/processor/range_map.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/processor/range_map.h')
-rw-r--r--src/processor/range_map.h35
1 files changed, 17 insertions, 18 deletions
diff --git a/src/processor/range_map.h b/src/processor/range_map.h
index 33f32973..578bd144 100644
--- a/src/processor/range_map.h
+++ b/src/processor/range_map.h
@@ -1,5 +1,4 @@
-// Copyright (c) 2006, Google Inc.
-// All rights reserved.
+// Copyright 2006 Google LLC
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -11,7 +10,7 @@
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
-// * Neither the name of Google Inc. nor the names of its
+// * Neither the name of Google LLC nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
@@ -78,17 +77,17 @@ class RangeMap {
// stored in the map. If enable_shrink_down is true and there is an overlap
// between the current range and some other range (already in the map),
// shrink down the range which ends at a higher address.
- bool StoreRange(const AddressType &base, const AddressType &size,
- const EntryType &entry);
+ bool StoreRange(const AddressType& base, const AddressType& size,
+ const EntryType& entry);
// Locates the range encompassing the supplied address. If there is no such
// range, returns false. entry_base, entry_delta, and entry_size, if
// non-NULL, are set to the base, delta, and size of the entry's range.
// A positive entry delta (> 0) indicates that there was an overlap and the
// entry was shrunk down (original start address was increased by delta).
- bool RetrieveRange(const AddressType &address, EntryType *entry,
- AddressType *entry_base, AddressType *entry_delta,
- AddressType *entry_size) const;
+ bool RetrieveRange(const AddressType& address, EntryType* entry,
+ AddressType* entry_base, AddressType* entry_delta,
+ AddressType* entry_size) const;
// Locates the range encompassing the supplied address, if one exists.
// If no range encompasses the supplied address, locates the nearest range
@@ -97,9 +96,9 @@ class RangeMap {
// if non-NULL, are set to the base, delta, and size of the entry's range.
// A positive entry delta (> 0) indicates that there was an overlap and the
// entry was shrunk down (original start address was increased by delta).
- bool RetrieveNearestRange(const AddressType &address, EntryType *entry,
- AddressType *entry_base, AddressType *entry_delta,
- AddressType *entry_size) const;
+ bool RetrieveNearestRange(const AddressType& address, EntryType* entry,
+ AddressType* entry_base, AddressType* entry_delta,
+ AddressType* entry_size) const;
// Treating all ranges as a list ordered by the address spaces that they
// occupy, locates the range at the index specified by index. Returns
@@ -110,9 +109,9 @@ class RangeMap {
// entry was shrunk down (original start address was increased by delta).
//
// RetrieveRangeAtIndex is not optimized for speedy operation.
- bool RetrieveRangeAtIndex(int index, EntryType *entry,
- AddressType *entry_base, AddressType *entry_delta,
- AddressType *entry_size) const;
+ bool RetrieveRangeAtIndex(int index, EntryType* entry,
+ AddressType* entry_base, AddressType* entry_delta,
+ AddressType* entry_size) const;
// Returns the number of ranges stored in the RangeMap.
int GetCount() const;
@@ -128,13 +127,13 @@ class RangeMap {
// Same a StoreRange() with the only exception that the |delta| can be
// passed in.
- bool StoreRangeInternal(const AddressType &base, const AddressType &delta,
- const AddressType &size, const EntryType &entry);
+ bool StoreRangeInternal(const AddressType& base, const AddressType& delta,
+ const AddressType& size, const EntryType& entry);
class Range {
public:
- Range(const AddressType &base, const AddressType &delta,
- const EntryType &entry)
+ Range(const AddressType& base, const AddressType& delta,
+ const EntryType& entry)
: base_(base), delta_(delta), entry_(entry) {}
AddressType base() const { return base_; }