Skip to content

Commit 79ede12

Browse files
authored
Merge pull request #1666 from OutpostUniverse/useStdToString
Use `std::to_string` instead of `NAS2D::stringFrom`
2 parents 4f9493b + 3da9eba commit 79ede12

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

appOPHD/MapObjects/Structures/Recycling.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
#include "../../UI/StringTable.h"
66

7-
#include <NAS2D/StringFrom.h>
8-
97

108
namespace
119
{
@@ -45,10 +43,10 @@ StringTable Recycling::createInspectorViewTable()
4543
StringTable stringTable(2, 2);
4644

4745
stringTable[{0, 0}].text = "Max Residents Supported:";
48-
stringTable[{1, 0}].text = NAS2D::stringFrom(residentialSupportCount());
46+
stringTable[{1, 0}].text = std::to_string(residentialSupportCount());
4947

5048
stringTable[{0, 1}].text = "Max Waste Processing Capacity:";
51-
stringTable[{1, 1}].text = NAS2D::stringFrom(wasteProcessingCapacity());
49+
stringTable[{1, 1}].text = std::to_string(wasteProcessingCapacity());
5250

5351
if (!operational()) {
5452
stringTable[{1, 0}].textColor = constants::WarningTextColor;

appOPHD/States/CrimeExecution.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#include <libOPHD/EnumDifficulty.h>
88
#include <libOPHD/RandomNumberGenerator.h>
99

10-
#include <NAS2D/StringFrom.h>
1110
#include <NAS2D/Utility.h>
1211

1312

@@ -113,7 +112,7 @@ void CrimeExecution::stealFood(FoodProduction& structure)
113112

114113
mCrimeEventSignal.emit(
115114
"Food Stolen",
116-
NAS2D::stringFrom(foodStolen) + " units of food was pilfered from a " + structure.name() + ". " + getReasonForStealing() + ".",
115+
std::to_string(foodStolen) + " units of food was pilfered from a " + structure.name() + ". " + getReasonForStealing() + ".",
117116
structure
118117
);
119118
}
@@ -148,7 +147,7 @@ void CrimeExecution::stealResources(Structure& structure, const std::array<std::
148147

149148
mCrimeEventSignal.emit(
150149
"Resources Stolen",
151-
NAS2D::stringFrom(amountStolen) + " units of " + resourceNames[indexToStealFrom] + " were stolen from a " + structure.name() + ". " + getReasonForStealing() + ".",
150+
std::to_string(amountStolen) + " units of " + resourceNames[indexToStealFrom] + " were stolen from a " + structure.name() + ". " + getReasonForStealing() + ".",
152151
structure
153152
);
154153
}

0 commit comments

Comments
 (0)