yvt
df920f680c
GLCameraBlurFilter
: Replace GLRenderer *
with GLRenderer &
2019-07-26 22:48:11 +09:00
yvt
8e23ef08d0
Replace GLRenderer *
in GLBloomFilter
with GLRenderer &
2019-07-26 22:47:01 +09:00
yvt
5c8ea3a861
Store IGLShadowMapRenderer
using std::unique_ptr
2019-07-26 22:45:26 +09:00
yvt
bc08e23d80
Replace raw pointers in IGLShadowMapRenderer
etc. with references
2019-07-26 22:42:04 +09:00
yvt
b1b07cf579
Replace GLRenderer *
in GLAutoExposureFilter
with GLRenderer &
2019-07-26 22:38:54 +09:00
yvt
3676643f30
Modernize GLAmbientShadowRenderer
2019-07-26 22:37:51 +09:00
yvt
b0c97c67ae
Replace raw pointers in GLAmbientShadowRenderer
with references
2019-07-26 22:28:15 +09:00
yvt
b49028d822
Add const
to GameMapLoader::IsComplete
2019-07-24 19:11:36 +09:00
yvt
3b15a205ff
Replace Deque
with std::deque
...
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.
2019-07-24 19:11:36 +09:00
YVT
ffb3f33abe
Remove a redundant assignment
...
Reported by Clang's static analysis.
2019-07-24 18:12:08 +09:00
YVT
d92149713a
Add a missing call to CheckError
2019-07-24 18:11:04 +09:00
yvt
d1ba2a729b
Fix to build with GCC 4.9
...
> error: invalid use of incomplete type ‘class spades::Bitmap’
2019-07-23 22:55:02 +09:00
yvt
403b0a5e7f
Make Function::Function
constexpr
to allow static initialization
...
`Function` is constructed for every `SPADES_MARK_FUNCTION`, so this
drastically reduces the number of constructor calls at startup.
2019-07-23 22:46:37 +09:00
yvt
f841c94db7
Change the return type of CreatePipeStream
to use unique_ptr
2019-07-23 22:28:56 +09:00
yvt
da7e61b25c
Change std::regex
static local variables to global
...
Removes the runtime cost caused by lazy initialization.
2019-07-23 22:25:12 +09:00
yvt
4e566cc671
Update CP437
...
- 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
2019-07-23 22:20:19 +09:00
yvt
701105f916
Change the return type of file opening functions to std::unique_ptr<_>
...
This also fixes a memory leak in `MainScreenHelper::SaveFavorites`.
2019-07-23 22:14:10 +09:00
yvt
d248ac2460
Change the return type of GameMapLoader::TakeGameMap
to Handle<_>
2019-07-23 21:57:40 +09:00
yvt
5fe8b0fe18
Remove StreamHandle
...
It was functionally identical to `std::shared_ptr<IStream>`.
2019-07-23 21:57:40 +09:00
yvt
a2257a6fb7
Change the return type of VoxelModeLoader::Load
to Handle<_>
2019-07-23 21:42:21 +09:00
yvt
eabb77fcce
Update VoxelModel
...
- 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
2019-07-23 21:39:56 +09:00
yvt
af2aa09eba
Delete Semaphore(const Semaphore &)
, etc.
2019-07-23 20:01:01 +09:00
yvt
90cbdee54a
Remove the deprecated exception specifications (func() throw(Type)
)
2019-07-23 19:52:34 +09:00
yvt
b48c5f489f
Use range-based for
loops
2019-07-23 19:36:08 +09:00
yvt
a2eff8fda5
Update Bitmap
...
- 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.
2019-07-23 19:31:24 +09:00
yvt
92a4b2466f
Rename DirectoryFileSystem::{physicalPath → PathToPhysical}
2019-07-20 17:19:34 +09:00
yvt
770f11a0d1
FTFont: Get rid of raw pointer
2019-07-20 17:16:09 +09:00
yvt
4c69adb972
Reformat
2019-07-20 17:13:16 +09:00
yvt
a0c9a661eb
Remove unused variables
2019-07-20 17:12:45 +09:00
yvt
0754d4e3dc
clang-format
2019-07-20 17:12:18 +09:00
yvt
e54a3ff470
FTFontSet
is no longer RefCountedObject
2019-07-20 17:10:27 +09:00
yvt
516156e39e
FTFontSet: Construct unique_ptr
earlier
...
This is a subtle change, but fixes memory leak caused by `std::list`'s
memory allocation failure.
2019-07-20 17:06:34 +09:00
yvt
b9a5d80f7b
Use Handle::New
to construct T <: RefCountedObject
...
Unless `T::T(Args...)` is inaccessible from `Handle::New`, in which case
`Handle::Handle{new T(args...), false}` should be used.
2019-07-20 17:01:04 +09:00
yvt
29ac869491
clang-format
2019-07-20 16:40:59 +09:00
yvt
5f0814988a
Use make_unique
to construct unique_ptr
2019-07-20 16:40:52 +09:00
yvt
830db57c01
Require rvalue for Handle::Unmanage
2019-07-20 16:38:21 +09:00
yvt
b4dcec2e1c
Use make_unique
to construct unique_ptr
2019-07-20 16:34:35 +09:00
yvt
725ee9f706
Merge remote-tracking branch 'origin/master' into patch-modernize
2019-07-20 16:18:10 +09:00
yvt
6e262ea6ec
Add stmp::make_unique
...
This template function is a polyfill of `std::make_unique`, which is
unavailable in GCC 4.9 (should we even be supporting this old thing?).
2019-07-20 16:17:10 +09:00
YVT
d467f3cf5a
Delete BdfToOSFont.cpp
2019-07-20 16:14:30 +09:00
yvt
1b67c4eff0
Turn BlockHitAction
into enum class
2019-07-20 16:03:33 +09:00
yvt
0470ca3187
ParticleSpriteEntity: Receive images via Handle<IImage>
2019-07-20 16:00:07 +09:00
yvt
6513bd0075
ParticleSpriteEntity: Use Handle
for reference counting
2019-07-20 15:57:56 +09:00
yvt
60fd3191c5
Remove Handle::operator T*()
, discouraging conversion to raw pointers
...
It was replaced by `Handle::GetPointerOrNull()`. Every use of
`GetPointerOrNull` should be reviewed. Some of them were already removed.
2019-07-20 15:47:42 +09:00
yvt
6517338dab
Delete RefCountedObject
's copy constructor
2019-07-20 14:18:48 +09:00
yvt
e6227b3361
Update IRenderer
for null safety and safe memory management
2019-07-20 13:48:49 +09:00
yvt
464b88a23b
Fix optional::operator=
2019-07-20 13:42:34 +09:00
yvt
9e770cc040
Update the rules for RefCountedObject
2019-07-20 13:25:35 +09:00
yvt
a44a900c62
Fix Handle::Handle(T&)
2019-07-20 12:36:11 +09:00
yvt
8cdb086bb1
Add implicit casts between Handle<T>
and stmp::optional<T &>
2019-07-20 12:26:44 +09:00