Profiling indicated that a little time (< 10% of `ApplyBlockActions`'s
total execution time) is spent on `Deque` when a large chunk of block
is being removed. Thus even *if* this commit slows down things, the
performance impact would be insignificant.
- Replace `std::map` with `std::unordered_map`
- clang-format
- Delete `CP437`'s default copy constructor instead of hiding it
- Move the internal declarations to an anonymous namespace
- Use `unique_ptr` instead of manually memory management
- All of its methods now perform bounds checking in release builds. The
exception is `*Unchecked` methods.
- Use an anonymous namespace for local definitions in `VoxelModel.cpp`
- `VoxelModel::LoadKV6` methods now returns `Handle<_>` and accepts
`IStream &`.
- Delete the copy constructor and assignment operator
- Remove debug code
- Added doc comments to all of its methods.
- `Bitmap::Load` methods now returns `Handle<Bitmap>`.
- `Bitmap::Load(IStream *)` now accepts `IStream &`.
- `Bitmap::{GetPixel, SetPixel}` now perform bounds checking in release
builds.
- Replaced raw pointers with references or smart pointers. Nullable
references are represented by `stmp::optional<const T&>`. (There are
many raw pointers still remaining. They should be replaced at some
point.)
- Added class template specializations `stmp::optional<T &>` and
`stmp::optional<const T&>`.
- Fixed `stmp::optional`'s various behaviors
- `World::{players, playerPersistents}` are now `std::array`.
- More uses of `stmp::optional` to clarify the semantics
- Renamed `PlayerThrownGrenade` to `PlayerThrewGrenade`
- Replaced old-style `for` loops with range based ones
- Deleted `Player`'s default constructors and `operator =`
- Deleted `TCGameMode`'s default constructor and `operator =`
- Deleted `CTFGameMode`'s default constructor and `operator =`
- Replaced `static_cast` with `dynamic_cast` for down-casting
- `RefCountedObject::operator*()` no longer requires non-constness to
return `T &`.
- Replaced the uses of `std::vector::operator[]` with `std::vector::at`
for bounds checking.
- Made some methods of `GameMap` `const`.
- Added some null checks.