Skip to content

Commit 70afb5a

Browse files
committed
More size_t
1 parent 314b162 commit 70afb5a

9 files changed

Lines changed: 20 additions & 27 deletions

File tree

‎src/Basescape/SellState.cpp‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ void SellState::think()
231231
* @param selected Selected craft.
232232
* @return Index of the selected craft.
233233
*/
234-
int SellState::getCraftIndex(unsigned selected) const
234+
int SellState::getCraftIndex(size_t selected) const
235235
{
236236
return selected - _soldiers.size();
237237
}
@@ -573,9 +573,9 @@ void SellState::updateItemStrings()
573573
* @param selected Currently selected item.
574574
* @return The type of the selected item.
575575
*/
576-
enum SellType SellState::getType(unsigned selected) const
576+
enum SellType SellState::getType(size_t selected) const
577577
{
578-
unsigned max = _soldiers.size();
578+
size_t max = _soldiers.size();
579579

580580
if (selected < max)
581581
return SELL_SOLDIER;
@@ -594,7 +594,7 @@ enum SellType SellState::getType(unsigned selected) const
594594
* @param selected Currently selected item.
595595
* @return Index of the selected item.
596596
*/
597-
int SellState::getItemIndex(unsigned selected) const
597+
int SellState::getItemIndex(size_t selected) const
598598
{
599599
return selected - _soldiers.size() - _crafts.size() - _hasSci - _hasEng;
600600
}

‎src/Basescape/SellState.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ class SellState : public State
6060
/// Gets selected quantity.
6161
int getQuantity();
6262
/// Gets the Type of the selected item.
63-
enum SellType getType(unsigned selected) const;
63+
enum SellType getType(size_t selected) const;
6464
/// Gets the index of selected item.
65-
int getItemIndex(unsigned selected) const;
65+
int getItemIndex(size_t selected) const;
6666
/// Gets the index of the selected craft.
67-
int getCraftIndex(unsigned selected) const;
67+
int getCraftIndex(size_t selected) const;
6868
public:
6969
/// Creates the Sell state.
7070
SellState(Game *game, Base *base);

‎src/Basescape/TransferItemsState.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -762,9 +762,9 @@ double TransferItemsState::getDistance() const
762762
* @param selected The selected item.
763763
* @return The type of the selected item.
764764
*/
765-
enum TransferType TransferItemsState::getType(unsigned selected) const
765+
enum TransferType TransferItemsState::getType(size_t selected) const
766766
{
767-
unsigned max = _soldiers.size();
767+
size_t max = _soldiers.size();
768768

769769
if (selected < max)
770770
return TRANSFER_SOLDIER;
@@ -783,7 +783,7 @@ enum TransferType TransferItemsState::getType(unsigned selected) const
783783
* @param selected Currently selected item.
784784
* @return Index of the selected item.
785785
*/
786-
int TransferItemsState::getItemIndex(unsigned selected) const
786+
int TransferItemsState::getItemIndex(size_t selected) const
787787
{
788788
return selected - _soldiers.size() - _crafts.size() - _hasSci - _hasEng;
789789
}

‎src/Basescape/TransferItemsState.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ class TransferItemsState : public State
6565
/// Gets distance between bases.
6666
double getDistance() const;
6767
/// Gets type of selected item.
68-
enum TransferType getType(unsigned selected) const;
68+
enum TransferType getType(size_t selected) const;
6969
/// Gets item Index.
70-
int getItemIndex(unsigned selected) const;
70+
int getItemIndex(size_t selected) const;
7171
public:
7272
/// Creates the Transfer Items state.
7373
TransferItemsState(Game *game, Base *baseFrom, Base *baseTo);

‎src/Geoscape/GeoscapeState.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ void GeoscapeState::time5Seconds()
663663
(*i)->think();
664664
if ((*i)->reachedDestination())
665665
{
666-
unsigned terrorSiteCount = _game->getSavedGame()->getTerrorSites()->size();
666+
size_t terrorSiteCount = _game->getSavedGame()->getTerrorSites()->size();
667667
AlienMission *mission = (*i)->getMission();
668668
bool detected = (*i)->getDetected();
669669
mission->ufoReachedWaypoint(**i, *_game, *_globe);

‎src/OpenXcom.2010.sln‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ Global
1313
GlobalSection(ProjectConfigurationPlatforms) = postSolution
1414
{D8F55ED4-1A4E-4111-8E83-153CF91FE25A}.Debug|Win32.ActiveCfg = Debug|Win32
1515
{D8F55ED4-1A4E-4111-8E83-153CF91FE25A}.Debug|Win32.Build.0 = Debug|Win32
16-
{D8F55ED4-1A4E-4111-8E83-153CF91FE25A}.Debug|x64.ActiveCfg = Debug|Win32
16+
{D8F55ED4-1A4E-4111-8E83-153CF91FE25A}.Debug|x64.ActiveCfg = Debug|x64
17+
{D8F55ED4-1A4E-4111-8E83-153CF91FE25A}.Debug|x64.Build.0 = Debug|x64
1718
{D8F55ED4-1A4E-4111-8E83-153CF91FE25A}.Release|Win32.ActiveCfg = Release|Win32
1819
{D8F55ED4-1A4E-4111-8E83-153CF91FE25A}.Release|Win32.Build.0 = Release|Win32
19-
{D8F55ED4-1A4E-4111-8E83-153CF91FE25A}.Release|x64.ActiveCfg = Release|Win32
20+
{D8F55ED4-1A4E-4111-8E83-153CF91FE25A}.Release|x64.ActiveCfg = Release|x64
21+
{D8F55ED4-1A4E-4111-8E83-153CF91FE25A}.Release|x64.Build.0 = Release|x64
2022
EndGlobalSection
2123
GlobalSection(SolutionProperties) = preSolution
2224
HideSolutionNode = FALSE

‎src/Ruleset/RuleAlienMission.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class RuleAlienMission
7171
/// Loads alien mission data from YAML.
7272
void load(const YAML::Node &node);
7373
/// Gets the number of waves.
74-
unsigned getWaveCount() const { return _waves.size(); }
74+
size_t getWaveCount() const { return _waves.size(); }
7575
/// Gets the full wave information.
7676
const MissionWave &getWave(unsigned index) const { return _waves[index]; }
7777
/// Gets the score for this mission.

‎src/Ruleset/UfoTrajectory.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class UfoTrajectory
6363
* Gets the number of waypoints in this trajectory.
6464
* @return The number of waypoints.
6565
*/
66-
unsigned getWaypointCount() const { return _waypoints.size() - 1; }
66+
size_t getWaypointCount() const { return _waypoints.size() - 1; }
6767

6868
/**
6969
* Gets the zone index at a waypoint.

‎src/pch.h‎

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,7 @@
5757
#include <typeinfo>
5858
#include <utility>
5959
#include <vector>
60-
#ifdef _WIN32
61-
#ifndef NOMINMAX
62-
#define NOMINMAX
63-
#endif
64-
#define WIN32_LEAN_AND_MEAN
65-
#include <windows.h>
66-
//#include <shlobj.h>
67-
//#include <shlwapi.h>
68-
#include <direct.h>
69-
#else
60+
#ifndef _WIN32
7061
#include <unistd.h>
7162
#include <sys/param.h>
7263
#include <pwd.h>

0 commit comments

Comments
 (0)