| 149 | }; |
| 150 | |
| 151 | bool CRenderLayerTile::CTileLayerVisuals::Init(unsigned int Width, unsigned int Height) |
| 152 | { |
| 153 | m_Width = Width; |
| 154 | m_Height = Height; |
| 155 | if(Width == 0 || Height == 0) |
| 156 | return false; |
| 157 | if constexpr(sizeof(unsigned int) >= sizeof(ptrdiff_t)) |
| 158 | if(Width >= std::numeric_limits<std::ptrdiff_t>::max() || Height >= std::numeric_limits<std::ptrdiff_t>::max()) |
| 159 | return false; |
| 160 | |
| 161 | m_vTilesOfLayer.resize((size_t)Height * (size_t)Width); |
| 162 | |
| 163 | m_vBorderTop.resize(Width); |
| 164 | m_vBorderBottom.resize(Width); |
| 165 | |
| 166 | m_vBorderLeft.resize(Height); |
| 167 | m_vBorderRight.resize(Height); |
| 168 | return true; |
| 169 | } |
| 170 | |
| 171 | /************** |
| 172 | * Base Layer * |
no test coverage detected