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
32
32
uint32_t x;
33
33
uint32_t y;
34
34
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 ;
39
39
40
40
CachedTile ()
41
+ : x(0 ),
42
+ y (0 ),
43
+ z(0 ),
44
+ valid(false ),
45
+ busy(false ),
46
+ mutex(xSemaphoreCreateMutex()),
47
+ buffer(nullptr )
41
48
{
42
- mutex = xSemaphoreCreateMutex ();
43
49
}
44
50
45
51
~CachedTile ()
@@ -54,7 +60,7 @@ struct CachedTile
54
60
55
61
bool allocate ()
56
62
{
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) );
58
64
return buffer != nullptr ;
59
65
}
60
66
You can’t perform that action at this time.
0 commit comments