clang-format

This commit is contained in:
yvt 2019-07-17 00:31:22 +09:00
parent 7c3a39e639
commit 5db97f7f10
No known key found for this signature in database
GPG Key ID: 48F2768FA8D07C92
17 changed files with 129 additions and 120 deletions

View File

@ -54,5 +54,5 @@ namespace spades {
bool PlayerHasIntel(World &world, Player &player);
};
}
}
} // namespace client
} // namespace spades

View File

@ -530,8 +530,7 @@ namespace spades {
eye.z -= p * 0.06f * sp;
}
return Matrix4::FromAxis(-player.GetRight(), player.GetFront(), -player.GetUp(),
eye);
return Matrix4::FromAxis(-player.GetRight(), player.GetFront(), -player.GetUp(), eye);
}
void ClientPlayer::SetSkinParameterForTool(Player::ToolType type, asIScriptObject *skin) {
@ -548,7 +547,7 @@ namespace spades {
interface.SetActionProgress(p.GetSpadeAnimationProgress());
} else if (inp.secondary) {
interface.SetActionType(p.IsFirstDig() ? SpadeActionTypeDigStart
: SpadeActionTypeDig);
: SpadeActionTypeDig);
interface.SetActionProgress(p.GetDigAnimationProgress());
} else {
interface.SetActionType(SpadeActionTypeIdle);
@ -697,8 +696,7 @@ namespace spades {
float sp = 1.f - aimDownState;
sp *= .3f;
sp *= std::min(1.f, p.GetVelocty().GetLength() * 5.f);
viewWeaponOffset.x +=
sinf(p.GetWalkAnimationProgress() * M_PI * 2.f) * 0.013f * sp;
viewWeaponOffset.x += sinf(p.GetWalkAnimationProgress() * M_PI * 2.f) * 0.013f * sp;
float vl = cosf(p.GetWalkAnimationProgress() * M_PI * 2.f);
vl *= vl;
viewWeaponOffset.z += vl * 0.018f * sp;

View File

@ -114,5 +114,5 @@ namespace spades {
Matrix4 GetEyeMatrix();
};
}
}
} // namespace client
} // namespace spades

View File

@ -32,6 +32,7 @@
#include "IAudioChunk.h"
#include "IAudioDevice.h"
#include "CTFGameMode.h"
#include "CenterMessageView.h"
#include "ChatWindow.h"
#include "ClientPlayer.h"
@ -41,6 +42,7 @@
#include "Fonts.h"
#include "HurtRingView.h"
#include "IFont.h"
#include "IGameMode.h"
#include "ILocalEntity.h"
#include "LimboView.h"
#include "MapView.h"
@ -50,8 +52,6 @@
#include "SmokeSpriteEntity.h"
#include "TCProgressView.h"
#include "Tracer.h"
#include "IGameMode.h"
#include "CTFGameMode.h"
#include "GameMap.h"
#include "Grenade.h"
@ -103,7 +103,7 @@ namespace spades {
return name;
}
}
}
} // namespace
void Client::TakeScreenShot(bool sceneOnly) {
SceneDefinition sceneDef = CreateSceneDefinition();
@ -290,7 +290,7 @@ namespace spades {
if ((int)cg_playerNames == 0)
return;
Player &p = GetWorld()->GetLocalPlayer().value();
hitTag_t tag = hit_None;
@ -429,7 +429,7 @@ namespace spades {
Handle<IImage> img(renderer->RegisterImage("Gfx/Intel.png"), false);
// Strobe
Vector4 color {1.0f, 1.0f, 1.0f, 1.0f};
Vector4 color{1.0f, 1.0f, 1.0f, 1.0f};
color *= std::fabs(std::sin(world->GetTime() * 2.0f));
renderer->SetColorAlphaPremultiplied(color);
@ -559,7 +559,7 @@ namespace spades {
} else if (weap.GetAmmo() == 0 && weap.GetStock() == 0) {
msg = _Tr("Client", "Out of Ammo");
} else if (weap.GetStock() > 0 &&
weap.GetAmmo() < weap.GetClipSize() / 4) {
weap.GetAmmo() < weap.GetClipSize() / 4) {
msg = _Tr("Client", "Press [{0}] to Reload",
TranslateKeyName(cg_keyReloadWeapon));
}
@ -756,8 +756,9 @@ namespace spades {
color = Vector4(1.f, 1.f, 1.f, 1.f);
color *= fade;
font->DrawShadow(alertContents, Vector2(pos.x + contentsSize.x - textSize.x - margin,
pos.y + (contentsSize.y - textSize.y) * 0.5f),
font->DrawShadow(alertContents,
Vector2(pos.x + contentsSize.x - textSize.x - margin,
pos.y + (contentsSize.y - textSize.y) * 0.5f),
1.f, color, Vector4(0.f, 0.f, 0.f, fade * 0.5f));
}
@ -966,5 +967,5 @@ namespace spades {
DrawStats();
}
}
}
} // namespace client
} // namespace spades

View File

@ -27,8 +27,8 @@
#include "IAudioChunk.h"
#include "IAudioDevice.h"
#include "ClientUI.h"
#include "ChatWindow.h"
#include "ClientUI.h"
#include "Corpse.h"
#include "LimboView.h"
#include "MapView.h"
@ -441,7 +441,7 @@ namespace spades {
}
if (world->GetLocalPlayer()->IsToolWeapon() && weapInput.secondary &&
!lastVal && world->GetLocalPlayer()->IsReadyToUseTool() &&
!world->GetLocalPlayer()->GetWeapon().IsReloading() &&
!world->GetLocalPlayer()->GetWeapon().IsReloading() &&
GetSprintState() == 0.0f) {
AudioParam params;
params.volume = 0.08f;
@ -453,7 +453,7 @@ namespace spades {
Weapon &w = world->GetLocalPlayer()->GetWeapon();
if (w.GetAmmo() < w.GetClipSize() && w.GetStock() > 0 &&
(!world->GetLocalPlayer()->IsAwaitingReloadCompletion()) &&
(!w.IsReloading()) &&
(!w.IsReloading()) &&
world->GetLocalPlayer()->GetTool() == Player::ToolWeapon) {
if (world->GetLocalPlayer()->IsToolWeapon()) {
if (weapInput.secondary) {
@ -553,7 +553,7 @@ namespace spades {
} else if (CheckKey(cg_keyLimbo, name) && down) {
limbo->SetSelectedTeam(world->GetLocalPlayer()->GetTeamId());
limbo->SetSelectedWeapon(
world->GetLocalPlayer()->GetWeapon().GetWeaponType());
world->GetLocalPlayer()->GetWeapon().GetWeaponType());
inGameLimbo = true;
} else if (CheckKey(cg_keySceneshot, name) && down) {
TakeScreenShot(true);
@ -563,7 +563,8 @@ namespace spades {
TakeMapShot();
} else if (CheckKey(cg_keyFlashlight, name) && down) {
// spectators and dead players should not be able to toggle the flashlight
if (world->GetLocalPlayer()->IsSpectator() || !world->GetLocalPlayer()->IsAlive())
if (world->GetLocalPlayer()->IsSpectator() ||
!world->GetLocalPlayer()->IsAlive())
return;
flashlightOn = !flashlightOn;
flashlightOnTime = time;
@ -626,5 +627,5 @@ namespace spades {
}
}
}
}
}
} // namespace client
} // namespace spades

View File

@ -121,7 +121,7 @@ namespace spades {
return 1.f;
}
ClientPlayer* clientPlayer = clientPlayers[player.GetId()];
ClientPlayer *clientPlayer = clientPlayers[player.GetId()];
SPAssert(clientPlayer);
float delta = .8f;
@ -178,7 +178,8 @@ namespace spades {
def.fovY = (float)cg_fov * static_cast<float>(M_PI) / 180.f;
def.fovX = atanf(tanf(def.fovY * .5f) * renderer->ScreenWidth() /
renderer->ScreenHeight()) * 2.f;
renderer->ScreenHeight()) *
2.f;
def.zNear = 0.05f;
@ -204,7 +205,8 @@ namespace spades {
localFireVibration *= 0.4f;
}
roll += (SampleRandomFloat() - SampleRandomFloat()) * 0.03f * localFireVibration;
roll += (SampleRandomFloat() - SampleRandomFloat()) * 0.03f *
localFireVibration;
scale += SampleRandomFloat() * 0.04f * localFireVibration;
vibPitch += localFireVibration * (1.f - localFireVibration) * 0.01f;
@ -216,13 +218,13 @@ namespace spades {
{
float sp = SmoothStep(GetSprintState());
vibYaw += sinf(player.GetWalkAnimationProgress() *
static_cast<float>(M_PI) * 2.f) *
0.01f * sp;
static_cast<float>(M_PI) * 2.f) *
0.01f * sp;
roll -= sinf(player.GetWalkAnimationProgress() *
static_cast<float>(M_PI) * 2.f) *
0.005f * (sp);
static_cast<float>(M_PI) * 2.f) *
0.005f * (sp);
float p = cosf(player.GetWalkAnimationProgress() *
static_cast<float>(M_PI) * 2.f);
static_cast<float>(M_PI) * 2.f);
p = p * p;
p *= p;
p *= p;
@ -230,14 +232,14 @@ namespace spades {
if (shakeLevel >= 2) {
vibYaw += coherentNoiseSamplers[0].Sample(
player.GetWalkAnimationProgress() * 2.5f) *
0.005f * sp;
player.GetWalkAnimationProgress() * 2.5f) *
0.005f * sp;
vibPitch += coherentNoiseSamplers[1].Sample(
player.GetWalkAnimationProgress() * 2.5f) *
0.01f * sp;
player.GetWalkAnimationProgress() * 2.5f) *
0.01f * sp;
roll += coherentNoiseSamplers[2].Sample(
player.GetWalkAnimationProgress() * 2.5f) *
0.008f * sp;
player.GetWalkAnimationProgress() * 2.5f) *
0.008f * sp;
scale += sp * 0.1f;
}
@ -246,7 +248,8 @@ namespace spades {
def.fovY = (float)cg_fov * static_cast<float>(M_PI) / 180.f;
def.fovX = atanf(tanf(def.fovY * .5f) * renderer->ScreenWidth() /
renderer->ScreenHeight()) * 2.f;
renderer->ScreenHeight()) *
2.f;
// for 1st view, camera blur can be used
def.denyCameraBlur = false;
@ -287,15 +290,15 @@ namespace spades {
Vector3 center = player.GetEye();
if (!player.IsAlive() && lastMyCorpse &&
&player == world->GetLocalPlayer()) {
&player == world->GetLocalPlayer()) {
center = lastMyCorpse->GetCenter();
}
if (map->IsSolidWrapped((int)floorf(center.x), (int)floorf(center.y),
(int)floorf(center.z))) {
(int)floorf(center.z))) {
float z = center.z;
while (z > center.z - 5.f) {
if (!map->IsSolidWrapped((int)floorf(center.x),
(int)floorf(center.y), (int)floorf(z))) {
(int)floorf(center.y), (int)floorf(z))) {
center.z = z;
break;
} else {
@ -306,8 +309,8 @@ namespace spades {
float distance = 5.f;
if (&player == world->GetLocalPlayer() &&
world->GetLocalPlayer()->GetTeamId() < 2 &&
!world->GetLocalPlayer()->IsAlive()) {
world->GetLocalPlayer()->GetTeamId() < 2 &&
!world->GetLocalPlayer()->IsAlive()) {
// deathcam.
float elapsedTime = time - lastAliveTime;
distance -= 3.f * expf(-elapsedTime * 1.f);
@ -344,7 +347,8 @@ namespace spades {
def.fovY = (float)cg_fov * static_cast<float>(M_PI) / 180.f;
def.fovX = atanf(tanf(def.fovY * .5f) * renderer->ScreenWidth() /
renderer->ScreenHeight()) * 2.f;
renderer->ScreenHeight()) *
2.f;
// Update initial floating camera pos
freeCameraState.position = def.viewOrigin;
@ -369,7 +373,8 @@ namespace spades {
def.fovY = (float)cg_fov * static_cast<float>(M_PI) / 180.f;
def.fovX = atanf(tanf(def.fovY * .5f) * renderer->ScreenWidth() /
renderer->ScreenHeight()) * 2.f;
renderer->ScreenHeight()) *
2.f;
// for 1st view, camera blur can be used
def.denyCameraBlur = false;
@ -386,7 +391,8 @@ namespace spades {
if (grenVib > 1.f)
grenVib = 1.f;
roll += (SampleRandomFloat() - SampleRandomFloat()) * 0.2f * grenVib;
vibPitch += (SampleRandomFloat() - SampleRandomFloat()) * 0.1f * grenVib;
vibPitch +=
(SampleRandomFloat() - SampleRandomFloat()) * 0.1f * grenVib;
vibYaw += (SampleRandomFloat() - SampleRandomFloat()) * 0.1f * grenVib;
scale -= (SampleRandomFloat() - SampleRandomFloat()) * 0.1f * grenVib;
@ -445,7 +451,7 @@ namespace spades {
if ((int)cg_manualFocus) {
// Depth of field is manually controlled
def.depthOfFieldNearBlurStrength = def.depthOfFieldFarBlurStrength =
0.5f * (float)cg_depthOfFieldAmount;
0.5f * (float)cg_depthOfFieldAmount;
def.depthOfFieldFocalLength = focalLength;
} else {
def.depthOfFieldNearBlurStrength = cg_depthOfFieldAmount;
@ -605,7 +611,7 @@ namespace spades {
clientPlayers[i]->AddToScene();
}
auto &nades = world->GetAllGrenades();
for (auto &nade: nades) {
for (auto &nade : nades) {
AddGrenadeToScene(*nade);
}
@ -638,7 +644,7 @@ namespace spades {
std::vector<IntVector3> blocks;
if (p->IsBlockCursorDragging()) {
blocks = world->CubeLine(p->GetBlockCursorDragPos(),
p->GetBlockCursorPos(), 256);
p->GetBlockCursorPos(), 256);
} else {
blocks.push_back(p->GetBlockCursorPos());
}
@ -651,8 +657,10 @@ namespace spades {
if ((int)blocks.size() > p->GetNumBlocks())
color = MakeVector3(1.f, 0.f, 0.f);
IModel *curLine = renderer->RegisterModel("Models/MapObjects/BlockCursorLine.kv6");
IModel *curSingle = renderer->RegisterModel("Models/MapObjects/BlockCursorSingle.kv6");
IModel *curLine =
renderer->RegisterModel("Models/MapObjects/BlockCursorLine.kv6");
IModel *curSingle =
renderer->RegisterModel("Models/MapObjects/BlockCursorSingle.kv6");
for (size_t i = 0; i < blocks.size(); i++) {
IntVector3 &v = blocks[i];
bool solid = blocks.size() > 2 && map->IsSolid(v.x, v.y, v.z);
@ -660,11 +668,16 @@ namespace spades {
param.ghost = true;
param.opacity = active && !solid ? .7f : .3f;
param.customColor = color;
param.matrix = Matrix4::Translate(MakeVector3(v.x + .5f, v.y + .5f, v.z + .5f));
param.matrix = param.matrix * Matrix4::Scale(1.f / 24.f + (solid ? 0.0005f : 0.f)); // make cursor larger if needed to stop z-fighting
param.matrix =
Matrix4::Translate(MakeVector3(v.x + .5f, v.y + .5f, v.z + .5f));
param.matrix =
param.matrix *
Matrix4::Scale(
1.f / 24.f +
(solid ? 0.0005f
: 0.f)); // make cursor larger if needed to stop z-fighting
renderer->RenderModel(blocks.size() > 1 ? curLine : curSingle, param);
}
}
}
}
@ -717,5 +730,5 @@ namespace spades {
return v2;
}
}
}
} // namespace client
} // namespace spades

View File

@ -689,10 +689,9 @@ namespace spades {
if (isLocal)
audioDevice->PlayLocal(c, MakeVector3(.4f, -.3f, .5f), AudioParam());
else
audioDevice->Play(c,
p.GetEye() + p.GetFront() * 0.5f - p.GetUp() * .3f +
p.GetRight() * .4f,
AudioParam());
audioDevice->Play(
c, p.GetEye() + p.GetFront() * 0.5f - p.GetUp() * .3f + p.GetRight() * .4f,
AudioParam());
}
}
@ -705,14 +704,14 @@ namespace spades {
if (isLocal)
audioDevice->PlayLocal(c, MakeVector3(.4f, -.3f, .5f), AudioParam());
else
audioDevice->Play(c,
p.GetEye() + p.GetFront() * 0.5f - p.GetUp() * .3f +
p.GetRight() * .4f,
AudioParam());
audioDevice->Play(
c, p.GetEye() + p.GetFront() * 0.5f - p.GetUp() * .3f + p.GetRight() * .4f,
AudioParam());
}
}
void Client::PlayerThrewGrenade(spades::client::Player &p, stmp::optional<const Grenade &> g) {
void Client::PlayerThrewGrenade(spades::client::Player &p,
stmp::optional<const Grenade &> g) {
SPADES_MARK_FUNCTION();
if (!IsMuted()) {
@ -727,10 +726,9 @@ namespace spades {
if (isLocal)
audioDevice->PlayLocal(c, MakeVector3(.4f, 0.1f, .3f), AudioParam());
else
audioDevice->Play(c,
p.GetEye() + p.GetFront() * 0.5f - p.GetUp() * .2f +
p.GetRight() * .3f,
AudioParam());
audioDevice->Play(
c, p.GetEye() + p.GetFront() * 0.5f - p.GetUp() * .2f + p.GetRight() * .3f,
AudioParam());
}
}
@ -922,11 +920,11 @@ namespace spades {
// log to netlog
if (&killer != &victim) {
NetLog("%s (%s) [%s] %s (%s)", killer.GetName().c_str(),
world->GetTeam(killer.GetTeamId()).name.c_str(), cause.c_str(),
victim.GetName().c_str(), world->GetTeam(victim.GetTeamId()).name.c_str());
world->GetTeam(killer.GetTeamId()).name.c_str(), cause.c_str(),
victim.GetName().c_str(), world->GetTeam(victim.GetTeamId()).name.c_str());
} else {
NetLog("%s (%s) [%s]", killer.GetName().c_str(),
world->GetTeam(killer.GetTeamId()).name.c_str(), cause.c_str());
world->GetTeam(killer.GetTeamId()).name.c_str(), cause.c_str());
}
// show big message if player is involved

View File

@ -19,13 +19,13 @@
*/
#include "Corpse.h"
#include <Core/Debug.h>
#include <Core/Settings.h>
#include "GameMap.h"
#include "IModel.h"
#include "IRenderer.h"
#include "Player.h"
#include "World.h"
#include <Core/Debug.h>
#include <Core/Settings.h>
using namespace std;
@ -84,8 +84,7 @@ namespace spades {
SetNode(Arm2, torso * MakeVector3(-0.2f, -.4f, .2f));
}
SetNode(Head,
(nodes[Torso1].pos + nodes[Torso2].pos) * .5f + MakeVector3(0, 0, -0.6f));
SetNode(Head, (nodes[Torso1].pos + nodes[Torso2].pos) * .5f + MakeVector3(0, 0, -0.6f));
}
void Corpse::SetNode(NodeType n, spades::Vector3 v) {
@ -99,9 +98,7 @@ namespace spades {
nodes[n].lastPos = v;
nodes[n].lastForce = MakeVector3(0, 0, 0);
}
void Corpse::SetNode(NodeType n, spades::Vector4 v) {
SetNode(n, v.GetXYZ());
}
void Corpse::SetNode(NodeType n, spades::Vector4 v) { SetNode(n, v.GetXYZ()); }
Corpse::~Corpse() {}
@ -746,5 +743,5 @@ namespace spades {
for (int i = 0; i < NodeCount; i++)
nodes[i].vel += v;
}
}
}
} // namespace client
} // namespace spades

View File

@ -100,5 +100,5 @@ namespace spades {
void AddImpulse(Vector3);
};
}
}
} // namespace client
} // namespace spades

View File

@ -19,8 +19,6 @@
*/
#include "FallingBlock.h"
#include <Core/Debug.h>
#include <Core/Exception.h>
#include "Client.h"
#include "GameMap.h"
#include "IModel.h"
@ -28,6 +26,8 @@
#include "ParticleSpriteEntity.h"
#include "SmokeSpriteEntity.h"
#include "World.h"
#include <Core/Debug.h>
#include <Core/Exception.h>
#include <limits.h>
namespace spades {
@ -104,7 +104,7 @@ namespace spades {
const Handle<GameMap> &map = client->GetWorld()->GetMap();
Vector3 orig = matrix.GetOrigin();
SPAssert(map);
if (time > 1.f || map->ClipBox(orig.x, orig.y, orig.z)) {
@ -142,8 +142,8 @@ namespace spades {
client->grenadeVibration += impact / (dist + 5.f);
if (client->grenadeVibration > 1.f)
client->grenadeVibration = 1.f;
auto *getRandom = SampleRandomFloat;
auto *getRandom = SampleRandomFloat;
for (int x = 0; x < w; x++) {
Vector3 p1 = vmOrigin + vmAxis1 * (float)x;
@ -171,11 +171,12 @@ namespace spades {
{
ParticleSpriteEntity *ent =
new SmokeSpriteEntity(client, col, 70.f);
ent->SetTrajectory(p3, (MakeVector3(getRandom() - getRandom(),
getRandom() - getRandom(),
getRandom() - getRandom())) *
0.2f,
1.f, 0.f);
ent->SetTrajectory(
p3,
(MakeVector3(getRandom() - getRandom(), getRandom() - getRandom(),
getRandom() - getRandom())) *
0.2f,
1.f, 0.f);
ent->SetRotation(getRandom() * (float)M_PI * 2.f);
ent->SetRadius(1.0f, 0.5f);
ent->SetBlockHitAction(ParticleSpriteEntity::Ignore);
@ -187,10 +188,11 @@ namespace spades {
for (int i = 0; i < 6; i++) {
ParticleSpriteEntity *ent =
new ParticleSpriteEntity(client, img, col);
ent->SetTrajectory(p3, MakeVector3(getRandom() - getRandom(),
getRandom() - getRandom(),
getRandom() - getRandom()) *
13.f,
ent->SetTrajectory(p3,
MakeVector3(getRandom() - getRandom(),
getRandom() - getRandom(),
getRandom() - getRandom()) *
13.f,
1.f, .6f);
ent->SetRotation(getRandom() * (float)M_PI * 2.f);
ent->SetRadius(0.35f + getRandom() * getRandom() * 0.1f);
@ -223,5 +225,5 @@ namespace spades {
param.matrix = matrix;
client->GetRenderer()->RenderModel(model, param);
}
}
}
} // namespace client
} // namespace spades

View File

@ -21,8 +21,8 @@
#include <ctime> //windows needs this.
#include "HitTestDebugger.h"
#include "GameMap.h"
#include "HitTestDebugger.h"
#include "Player.h"
#include "Weapon.h"
#include "World.h"
@ -148,7 +148,7 @@ namespace spades {
def.zFar = 200.f;
// start rendering
const Handle<GameMap>& map = world->GetMap();
const Handle<GameMap> &map = world->GetMap();
if (!def.skipWorld) {
renderer->SetGameMap(&*map);
}
@ -307,5 +307,5 @@ namespace spades {
renderer->Flip();
}
}
}
} // namespace client
} // namespace spades

View File

@ -112,5 +112,5 @@ namespace spades {
AABB2(0, 0, image->GetWidth(), image->GetHeight()));
}
}
}
}
} // namespace client
} // namespace spades

View File

@ -140,7 +140,7 @@ namespace spades {
IntVector3 color);
Player(const Player &) = delete;
void operator =(const Player &) = delete;
void operator=(const Player &) = delete;
~Player();

View File

@ -20,8 +20,8 @@
*/
#include "TCGameMode.h"
#include <Core/Debug.h>
#include "World.h"
#include <Core/Debug.h>
namespace spades {
namespace client {
@ -49,5 +49,5 @@ namespace spades {
prog = 1.f;
return prog;
}
}
}
} // namespace client
} // namespace spades

View File

@ -78,5 +78,5 @@ namespace spades {
void AddTerritory(const Territory &);
};
}
}
} // namespace client
} // namespace spades

View File

@ -33,7 +33,7 @@ namespace spades {
owner(p),
time(0),
shooting(false),
shootingPreviously(false),
shootingPreviously(false),
reloading(false),
nextShotTime(0.f),
reloadStartTime(-101.f),
@ -388,9 +388,8 @@ namespace spades {
case SHOTGUN_WEAPON: return new ShotgunWeapon4(p.GetWorld(), p);
default: SPInvalidEnum("type", type);
}
default:
SPInvalidEnum("protocolVersion", gp.protocolVersion);
default: SPInvalidEnum("protocolVersion", gp.protocolVersion);
}
}
}
}
} // namespace client
} // namespace spades

View File

@ -149,4 +149,4 @@ namespace spades {
*/
template <class S> Handle<S> Cast() const & { return Handle{*this}.Cast<S>(); }
};
}
} // namespace spades