Skip to content

Commit

Permalink
Fix iterator bug on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
nhatdongdang committed Sep 9, 2024
1 parent 8a42341 commit 16f69c0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/mcpp/util.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#pragma once

#include "block.h"
#include <cstddef>
#include <iterator>
#include <ostream>
#include <vector>

Expand Down Expand Up @@ -101,6 +103,8 @@ struct Chunk {
* access to the elements stored in the chunk.
*/
struct Iterator {
using iterator_category = std::forward_iterator_tag;
using difference_type = std::ptrdiff_t;
using value_type = BlockType;
using pointer = BlockType*;
using reference = BlockType&;
Expand Down Expand Up @@ -256,6 +260,8 @@ struct HeightMap {
* operations over the height data stored within a HeightMap.
*/
struct Iterator {
using iterator_category = std::forward_iterator_tag;
using difference_type = std::ptrdiff_t;
using value_type = int;
using pointer = int*;
using reference = int&;
Expand Down

0 comments on commit 16f69c0

Please sign in to comment.