From 89baed4ed5fdd8da8f006002135f2d5cc5d83800 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 2 Feb 2015 04:50:08 +0100 Subject: Region: make visitor argument a reference --- src/World/Region.cpp | 2 +- src/World/Region.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/World/Region.cpp b/src/World/Region.cpp index 4551d73..886f96b 100644 --- a/src/World/Region.cpp +++ b/src/World/Region.cpp @@ -54,7 +54,7 @@ Region::ChunkMap Region::processHeader(const uint8_t header[4096]) { return map; } -void Region::visitChunks(const char *filename, ChunkVisitor visitor) { +void Region::visitChunks(const char *filename, const ChunkVisitor &visitor) { std::ifstream file; file.exceptions(std::ios::failbit | std::ios::badbit); file.open(filename, std::ios::in | std::ios::binary); diff --git a/src/World/Region.hpp b/src/World/Region.hpp index d88dbe1..7a8088f 100644 --- a/src/World/Region.hpp +++ b/src/World/Region.hpp @@ -53,7 +53,7 @@ private: static ChunkMap processHeader(const uint8_t header[4096]); public: - static void visitChunks(const char *filename, ChunkVisitor visitor); + static void visitChunks(const char *filename, const ChunkVisitor &visitor); }; } -- cgit v1.2.3