Skip to content

Commit

Permalink
RAI: Made compatible with MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
slogic authored and hoijui committed Dec 28, 2010
1 parent 1dc8dbd commit 1bf771c
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions AI/Skirmish/RAI/RAI.cpp
Expand Up @@ -1089,16 +1089,12 @@ void cRAI::DebugDrawShape(float3 centerPos, float lineLength, float width, int a
DebugDrawLine(centerPos, lineLength, 3, lineLength/2, lineLength/2, yPosOffset, lifeTime, arrow, width, group);
}

bool cRAI::LocateFile(IAICallback* cb, const string& relFileName, string& absFileName, bool forWriting) {

int action = AIVAL_LOCATE_FILE_R;
if (forWriting) {
action = AIVAL_LOCATE_FILE_W;
}
bool cRAI::LocateFile(IAICallback* cb, const string& relFileName, string& absFileName, bool forWriting)
{
int action = forWriting ? AIVAL_LOCATE_FILE_W : AIVAL_LOCATE_FILE_R;

const size_t absFN_sizeMax = 512 + relFileName.size();
char absFN[absFN_sizeMax];
STRCPYS(absFN, absFN_sizeMax, relFileName.c_str());
char absFN[2048];
STRCPYS(absFN, sizeof(absFN), relFileName.c_str());
const bool located = cb->GetValue(action, absFN);

if (located) {
Expand Down

0 comments on commit 1bf771c

Please sign in to comment.