6 Commits

Author SHA1 Message Date
yvt
7c3a39e639
Modernize
- 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.
2019-07-17 00:31:00 +09:00
yvt
49cc61c573 Use more smart pointers and modern language constructs 2017-12-15 23:05:08 +09:00
yvt
d856bcadaa Reduce compiler warnings 2014-04-06 22:42:17 +09:00
yvt
9da577a491 The very first scripting functionality for modding 2013-09-21 04:17:34 +09:00
yvt
13692657e1 Merge and some refactor (ref-counting some objects) 2013-09-14 13:28:19 +09:00
yvt
881c868b39 Merge branch 'master' of https://github.com/yvt/openspades
Conflicts:
	Sources/AngelScript/addons/scriptbuilder.h
	Sources/Core/Math.cpp
	Sources/ScriptBindings/ScriptManager.cpp
	Sources/ScriptBindings/ScriptManager.h
2013-09-14 13:28:12 +09:00