summaryrefslogtreecommitdiffhomepage
path: root/StarsEx/StarshipAI.cpp
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2024-03-26 01:45:33 +0100
committerAki <please@ignore.pl>2024-03-26 01:49:16 +0100
commitea4c0557d0b7c2317e03d3d3aaefd6063c99f091 (patch)
treedad4634faf3c17f3642d736f62350df88c117a59 /StarsEx/StarshipAI.cpp
parent38332f77dc1e7bb03776631101eff6e8ad8bcaef (diff)
downloadstarshatter-ea4c0557d0b7c2317e03d3d3aaefd6063c99f091.zip
starshatter-ea4c0557d0b7c2317e03d3d3aaefd6063c99f091.tar.gz
starshatter-ea4c0557d0b7c2317e03d3d3aaefd6063c99f091.tar.bz2
DWORD replaced with std::uint32_t in non-Win32-related parts
With the exception of some netcode. This brings some important questions and solidifies me in pursuing better abstract over definitions. It might also be a good idea to have distinct aliases or compound types for time and (net) identifiers.
Diffstat (limited to 'StarsEx/StarshipAI.cpp')
-rw-r--r--StarsEx/StarshipAI.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/StarsEx/StarshipAI.cpp b/StarsEx/StarshipAI.cpp
index 8b10a49..1de816e 100644
--- a/StarsEx/StarshipAI.cpp
+++ b/StarsEx/StarshipAI.cpp
@@ -12,6 +12,9 @@
*/
#include "StarshipAI.h"
+
+#include <cstdint>
+
#include "StarshipTacticalAI.h"
#include "Ship.h"
#include "ShipDesign.h"
@@ -27,7 +30,6 @@
#include "FlightComp.h"
#include "Farcaster.h"
#include "QuantumDrive.h"
-
#include "Clock.h"
#include "ContentBundle.h"
#include "Random.h"
@@ -65,7 +67,7 @@ StarshipAI::StarshipAI(SimObject* s)
tactical = new StarshipTacticalAI(this);
}
- sub_select_time = Clock::GetInstance()->GameTime() + (DWORD) Random(0, 2000);
+ sub_select_time = Clock::GetInstance()->GameTime() + static_cast<std::uint32_t>(Random(0, 2000));
point_defense_time = sub_select_time;
}