Browse Source

fix initialization order issues

feature/replace-renderer
Martin Dørum 3 years ago
parent
commit
fc129655b5
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      libswan/include/swan/LightServer.h

+ 3
- 2
libswan/include/swan/LightServer.h View File

@@ -82,7 +82,6 @@ private:
void processEvent(const Event &event, std::vector<NewLightChunk> &newChunks);
void run();

LightCallback &cb_;
bool running_ = true;
std::map<std::pair<int, int>, LightChunk> chunks_;
std::set<std::pair<int, int>> updatedChunks_;
@@ -92,9 +91,11 @@ private:
int buffer_ = 0;
std::vector<Event> buffers_[2] = { {}, {} };
std::vector<NewLightChunk> newChunkBuffers_[2] = { {}, {} };
std::thread thread_;
std::condition_variable cond_;
std::mutex mut_;

LightCallback &cb_;
std::thread thread_;
};

inline void LightServer::onSolidBlockAdded(TilePos pos) {

Loading…
Cancel
Save