Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix iterator bug on macos #86

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading