Skip to content

Commit

Permalink
remove useless _DEBUG prints
Browse files Browse the repository at this point in the history
  • Loading branch information
serg06 committed Jul 2, 2020
1 parent 36149ea commit 91501ed
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 28 deletions.
10 changes: 0 additions & 10 deletions src/chunk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,6 @@ void Chunk::generate() {
// create chunk
init_minichunks();

#ifdef _DEBUG
if (coords == vmath::ivec2(0, 0)) {
OutputDebugString("Warning: Generating chunk for {0, 0}.\n");
}
#endif

// create chunk data array
std::fill(__chunk_tmp_storage.begin(), __chunk_tmp_storage.end(), BlockType::Air);

Expand Down Expand Up @@ -281,8 +275,4 @@ void Chunk::generate() {
}

set_blocks(&__chunk_tmp_storage[0]);

#ifdef _DEBUG
OutputDebugString("");
#endif
}
1 change: 0 additions & 1 deletion src/messaging.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ namespace msg
using notifier_thread = std::function<void(std::shared_ptr<zmq::context_t>, on_ready_fn)>;

// TODO: Shorten all messages since ZMQ uses prefix matching? Or even just use ints!

#ifdef _DEBUG
static const std::string TEST = "TEST";
#endif
Expand Down
17 changes: 0 additions & 17 deletions src/world.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,6 @@ void WorldDataPart::enqueue_mesh_gen(std::shared_ptr<MiniChunk> mini, const bool

auto ret = zmq::send_multipart(bus.in, message, zmq::send_flags::dontwait);
assert(ret);

#ifdef _DEBUG
std::stringstream out;
out << "Enqueue coords " << vec2str(req->coords) << "\n";
OutputDebugString(out.str().c_str());
#endif //_DEBUG

#ifdef SLEEPS
// Just in case
std::this_thread::sleep_for(std::chrono::microseconds(1));
#endif // SLEEPS
}

// add chunk to chunk coords (x, z)
Expand Down Expand Up @@ -668,12 +657,6 @@ void WorldDataPart::handle_messages()
ChunkGenResponse* response_ = *message[1].data<ChunkGenResponse*>();
std::unique_ptr<ChunkGenResponse> response(response_);

#ifdef _DEBUG
std::stringstream out;
out << "WorldData: Received chunk for " << vec2str(response->coords) << "\n";
OutputDebugString(out.str().c_str());
#endif // _DEBUG

// Get the chunk
std::shared_ptr<Chunk> chunk = std::move(response->chunk);
assert(chunk);
Expand Down

0 comments on commit 91501ed

Please sign in to comment.