aboutsummaryrefslogtreecommitdiff
path: root/externals/breakpad/src/processor/static_map_iterator.h
diff options
context:
space:
mode:
authorcrueter <crueter@eden-emu.dev>2025-08-04 04:50:14 +0200
committercrueter <crueter@eden-emu.dev>2025-08-04 04:50:14 +0200
commit51b170b470ed587f99a7c2a773e4464687f0d07a (patch)
tree4c03c510cfb17a5f5d6233df490d78f06dcfa7f7 /externals/breakpad/src/processor/static_map_iterator.h
parent04e5e6453875ffa5c79cdb421a29bc19985b1049 (diff)
[cmake] refactor: Use CPM over submodules (#143)
Transfers the majority of submodules and large externals to CPM, using source archives rather than full Git clones. Not only does this save massive amounts of clone and configure time, but dependencies are grabbed on-demand rather than being required by default. Additionally, CPM will (generally) automatically search for system dependencies, though certain dependencies have options to control this. Testing shows gains ranging from 5x to 10x in terms of overall clone/configure time. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/143 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Diffstat (limited to 'externals/breakpad/src/processor/static_map_iterator.h')
-rw-r--r--externals/breakpad/src/processor/static_map_iterator.h112
1 files changed, 0 insertions, 112 deletions
diff --git a/externals/breakpad/src/processor/static_map_iterator.h b/externals/breakpad/src/processor/static_map_iterator.h
deleted file mode 100644
index 6c190e975d..0000000000
--- a/externals/breakpad/src/processor/static_map_iterator.h
+++ /dev/null
@@ -1,112 +0,0 @@
-// Copyright 2010 Google LLC
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// 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 LLC nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// static_map_iterator.h: StaticMapIterator template class declaration.
-//
-// StaticMapIterator provides increment and decrement operators to iterate
-// through a StaticMap map. It does not provide *, -> operators, user should
-// use GetKeyPtr(), GetKey(), GetValuePtr() interfaces to retrieve data or
-// pointer to data. StaticMapIterator is essentially a const_iterator.
-//
-// Author: Siyang Xie (lambxsy@google.com)
-
-
-#ifndef PROCESSOR_STATIC_MAP_ITERATOR_H__
-#define PROCESSOR_STATIC_MAP_ITERATOR_H__
-
-#include "google_breakpad/common/breakpad_types.h"
-
-namespace google_breakpad {
-
-// Forward declaration.
-template<typename Key, typename Value, typename Compare> class StaticMap;
-
-// StaticMapIterator does not support operator*() or operator->(),
-// User should use GetKey(), GetKeyPtr(), GetValuePtr() instead;
-template<typename Key, typename Value, typename Compare>
-class StaticMapIterator {
- public:
- // Constructors.
- StaticMapIterator(): index_(-1), base_(NULL) { }
-
- // Increment & Decrement operators:
- StaticMapIterator& operator++();
- StaticMapIterator operator++(int post_fix_operator);
-
- StaticMapIterator& operator--();
- StaticMapIterator operator--(int post_fix_operator);
-
- // Interface for retrieving data / pointer to data.
- const Key* GetKeyPtr() const;
-
- // Run time error will occur if GetKey() is called on an invalid iterator.
- inline const Key GetKey() const { return *GetKeyPtr(); }
-
- // return a raw memory pointer that points to the start address of value.
- const char* GetValueRawPtr() const;
-
- // return a reinterpret-casted pointer to the value.
- inline const Value* GetValuePtr() const {
- return reinterpret_cast<const Value*>(GetValueRawPtr());
- }
-
- bool operator==(const StaticMapIterator& x) const;
- bool operator!=(const StaticMapIterator& x) const;
-
- // Check if this iterator is valid.
- // If iterator is invalid, user is forbidden to use ++/-- operator
- // or interfaces for retrieving data / pointer to data.
- bool IsValid() const;
-
- private:
- friend class StaticMap<Key, Value, Compare>;
-
- // Only StaticMap can call this constructor.
- explicit StaticMapIterator(const char* base, const int32_t& index);
-
- // Index of node that the iterator is pointing to.
- int32_t index_;
-
- // Beginning address of the serialized map data.
- const char* base_;
-
- // Number of nodes in the map. Use it to identify end() iterator.
- int32_t num_nodes_;
-
- // offsets_ is an array of offset addresses of mapped values.
- // For example:
- // address_of_i-th_node_value = base_ + offsets_[i]
- const uint32_t* offsets_;
-
- // keys_[i] = key of i_th node.
- const Key* keys_;
-};
-
-} // namespace google_breakpad
-
-#endif // PROCESSOR_STATIC_MAP_ITERATOR_H__