Skip to content

Fix codacy unused class member #70

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

Merged
merged 4 commits into from
May 24, 2025
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