mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
UMPIterator: Fix misleading variable naming
This commit is contained in:
parent
51e5820cd3
commit
85191fa50a
2 changed files with 8 additions and 8 deletions
|
|
@ -35,10 +35,10 @@
|
|||
namespace juce::universal_midi_packets
|
||||
{
|
||||
|
||||
Iterator::Iterator (const uint32_t* ptr, [[maybe_unused]] size_t bytes) noexcept
|
||||
Iterator::Iterator (const uint32_t* ptr, [[maybe_unused]] size_t words) noexcept
|
||||
: view (ptr)
|
||||
#if JUCE_DEBUG
|
||||
, bytesRemaining (bytes)
|
||||
, wordsRemaining (words)
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public:
|
|||
Iterator() noexcept = default;
|
||||
|
||||
/** Creates an iterator pointing at `ptr`. */
|
||||
explicit Iterator (const uint32_t* ptr, size_t bytes) noexcept;
|
||||
explicit Iterator (const uint32_t* ptr, size_t words) noexcept;
|
||||
|
||||
using difference_type = std::iterator_traits<const uint32_t*>::difference_type;
|
||||
using value_type = View;
|
||||
|
|
@ -69,8 +69,8 @@ public:
|
|||
// If you hit this, the memory region contained a truncated or otherwise
|
||||
// malformed Universal MIDI Packet.
|
||||
// The Iterator can only be used on regions containing complete packets!
|
||||
jassert (increment <= bytesRemaining);
|
||||
bytesRemaining -= increment;
|
||||
jassert (increment <= wordsRemaining);
|
||||
wordsRemaining -= increment;
|
||||
#endif
|
||||
|
||||
view = View (view.data() + increment);
|
||||
|
|
@ -109,20 +109,20 @@ public:
|
|||
|
||||
The View can be queried for its size and content.
|
||||
*/
|
||||
reference operator*() noexcept { return view; }
|
||||
reference operator*() const noexcept { return view; }
|
||||
|
||||
/** Returns a pointer to a View of the packet currently
|
||||
pointed-to by this iterator.
|
||||
|
||||
The View can be queried for its size and content.
|
||||
*/
|
||||
pointer operator->() noexcept { return &view; }
|
||||
pointer operator->() const noexcept { return &view; }
|
||||
|
||||
private:
|
||||
View view;
|
||||
|
||||
#if JUCE_DEBUG
|
||||
size_t bytesRemaining = 0;
|
||||
size_t wordsRemaining = 0;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue