Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 0 additions & 3 deletions src/OpenStreetMap-esp32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,9 +456,6 @@ std::optional<std::unique_ptr<MemoryBuffer>> OpenStreetMap::urlToBuffer(const ch
return buffer;
}

thread_local OpenStreetMap *OpenStreetMap::currentInstance = nullptr;
thread_local uint16_t *OpenStreetMap::currentTileBuffer = nullptr;

void OpenStreetMap::PNGDraw(PNGDRAW *pDraw)
{
if (!currentInstance || !currentInstance->currentTileBuffer)
Expand Down
4 changes: 2 additions & 2 deletions src/OpenStreetMap-esp32.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ class OpenStreetMap
private:
SemaphoreHandle_t cacheMutex = nullptr;
std::vector<CachedTile> tilesCache;
thread_local static uint16_t *currentTileBuffer;
thread_local static OpenStreetMap *currentInstance;
static inline thread_local OpenStreetMap *currentInstance = nullptr;
static inline thread_local uint16_t *currentTileBuffer = nullptr;
static void PNGDraw(PNGDRAW *pDraw);
double lon2tile(double lon, uint8_t zoom);
double lat2tile(double lat, uint8_t zoom);
Expand Down