File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -32,14 +32,20 @@ struct CachedTile
3232 uint32_t x;
3333 uint32_t y;
3434 uint8_t z;
35- bool valid = false ;
36- bool busy = false ;
37- uint16_t *buffer = nullptr ;
38- SemaphoreHandle_t mutex = nullptr ;
35+ bool valid;
36+ bool busy;
37+ SemaphoreHandle_t mutex ;
38+ uint16_t *buffer ;
3939
4040 CachedTile ()
41+ : x(0 ),
42+ y (0 ),
43+ z(0 ),
44+ valid(false ),
45+ busy(false ),
46+ mutex(xSemaphoreCreateMutex()),
47+ buffer(nullptr )
4148 {
42- mutex = xSemaphoreCreateMutex ();
4349 }
4450
4551 ~CachedTile ()
@@ -54,7 +60,7 @@ struct CachedTile
5460
5561 bool allocate ()
5662 {
57- buffer = ( uint16_t *) heap_caps_malloc (256 * 256 * sizeof (uint16_t ), MALLOC_CAP_SPIRAM);
63+ buffer = static_cast < uint16_t *>( heap_caps_malloc (256 * 256 * sizeof (uint16_t ), MALLOC_CAP_SPIRAM) );
5864 return buffer != nullptr ;
5965 }
6066
You can’t perform that action at this time.
0 commit comments