Skip to content

Commit 648f699

Browse files
Fix codacy unused class member (#70)
* Change order
1 parent 3eb8017 commit 648f699

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/OpenStreetMap-esp32.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -456,9 +456,6 @@ std::optional<std::unique_ptr<MemoryBuffer>> OpenStreetMap::urlToBuffer(const ch
456456
return buffer;
457457
}
458458

459-
thread_local OpenStreetMap *OpenStreetMap::currentInstance = nullptr;
460-
thread_local uint16_t *OpenStreetMap::currentTileBuffer = nullptr;
461-
462459
void OpenStreetMap::PNGDraw(PNGDRAW *pDraw)
463460
{
464461
if (!currentInstance || !currentInstance->currentTileBuffer)

src/OpenStreetMap-esp32.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ class OpenStreetMap
8787
private:
8888
SemaphoreHandle_t cacheMutex = nullptr;
8989
std::vector<CachedTile> tilesCache;
90-
thread_local static uint16_t *currentTileBuffer;
91-
thread_local static OpenStreetMap *currentInstance;
90+
static inline thread_local OpenStreetMap *currentInstance = nullptr;
91+
static inline thread_local uint16_t *currentTileBuffer = nullptr;
9292
static void PNGDraw(PNGDRAW *pDraw);
9393
double lon2tile(double lon, uint8_t zoom);
9494
double lat2tile(double lat, uint8_t zoom);

0 commit comments

Comments
 (0)