Skip to content

Commit

Permalink
Merge pull request caveman2cosmos#1606 from caveman2cosmos/improvevsc…
Browse files Browse the repository at this point in the history
…odesupport

Improve support for vscode intellisense
  • Loading branch information
flabbert authored Dec 17, 2024
2 parents 5da52d2 + 61f588f commit 0eab309
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 7 deletions.
9 changes: 7 additions & 2 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@
"${workspaceFolder}\\Build\\deps\\Boost-1.55.0\\include",
"${workspaceFolder}\\Build\\deps\\Python24\\include"
],
"defines": ["_DEBUG", "UNICODE", "_UNICODE"],
"defines": [
"_DEBUG",
"_UNICODE",
"_MSC_VER=900",
"FP_PROFILE_EXTRA_ENABLE",
"_MOD_FRACTRADE"
],
"windowsSdkVersion": "10.0.22621.0",
"compilerPath": "${workspaceFolder}\\Build\\deps\\Microsoft Visual C++ Toolkit 2003\\bin\\cl.exe",
"cStandard": "c99",
"cppStandard": "c++03",
"intelliSenseMode": "windows-msvc-x86"
Expand Down
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["ms-vscode.cpptools"]
}
8 changes: 7 additions & 1 deletion Sources/.vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@
"${workspaceFolder}\\..\\Build\\deps\\Boost-1.55.0\\include",
"${workspaceFolder}\\..\\Build\\deps\\Python24\\include"
],
"defines": [],
"defines": [
"_DEBUG",
"_UNICODE",
"_MSC_VER=900",
"FP_PROFILE_EXTRA_ENABLE",
"_MOD_FRACTRADE"
],
"windowsSdkVersion": "10.0.22621.0",
"compilerPath": "cl.exe",
"cStandard": "c99",
Expand Down
1 change: 1 addition & 0 deletions Sources/CvCityAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7321,6 +7321,7 @@ int CvCityAI::AI_getGoodTileCount() const
{
// This check is necessary to stop oscillation which can result
// when best build changes food situation for city, changing the best build.
// this signature is erroring out in vscode, but it does compile and work as intended, so we ignore the error
eBuild = scoring::min_score(
pLoopPlot->units() | filtered(CvUnit::fn::getBuildType() != NO_BUILD)
| transformed(CvUnit::fn::getBuildType()),
Expand Down
6 changes: 3 additions & 3 deletions Sources/CvPlayerAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26223,11 +26223,11 @@ void CvPlayerAI::AI_setPushReligiousVictory()
}

bool bStateReligionBest = true;
for (iI = 0; iI < GC.getNumReligionInfos(); iI++)
for (int iJ = 0; iJ < GC.getNumReligionInfos(); iJ++)
{
if (eStateReligion != (ReligionTypes)iI)
if (eStateReligion != (ReligionTypes)iJ)
{
if (GC.getGame().calculateReligionPercent((ReligionTypes)iI) > iStateReligionInfluence)
if (GC.getGame().calculateReligionPercent((ReligionTypes)iJ) > iStateReligionInfluence)
{
bStateReligionBest = false;
break;
Expand Down
2 changes: 1 addition & 1 deletion Sources/CvTalkingHeadMessage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ int CvTalkingHeadMessage::getExpireTurn() const
case MESSAGE_TYPE_CHAT:
iExpireTurn += 20;
break;
case MESSAGE_TYPE_COMBAT_MESSAGE:
case MESSAGE_TYPE_COMBAT_MESSAGE:
iExpireTurn += 20;
break;
case MESSAGE_TYPE_MINOR_EVENT:
Expand Down

0 comments on commit 0eab309

Please sign in to comment.