Skip to content

Commit

Permalink
Put separate file reading/writing functions in anonymous namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
ZedThree committed Jun 25, 2020
1 parent d168a80 commit 0a80255
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/SetupModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
void* BinFileBuf;
BinFile* BF;
int netbuf[NUM_PLACE_TYPES * 1000000];

namespace {
constexpr std::uint32_t binary_density_file_magic_number = 0xf0f0f0f0;

void ReadBinaryDensityFile(FILE *dat)
Expand Down Expand Up @@ -121,6 +123,7 @@ void WriteBinaryDensityFile(const char *OutDensFile)
fwrite_big(BinFileBuf, sizeof(BinFile), (size_t)P.BinFileLen, dat2);
fclose(dat2);
}
}

///// INITIALIZE / SET UP FUNCTIONS
void SetupModel(char* DensityFile, char* NetworkFile, char* SchoolFile, char* RegDemogFile)
Expand Down Expand Up @@ -737,6 +740,7 @@ void SetupModel(char* DensityFile, char* NetworkFile, char* SchoolFile, char* Re
fprintf(stderr, "Model configuration complete.\n");
}

namespace {
void ReadSchoolFile(const char *SchoolFile)
{
int m;
Expand Down Expand Up @@ -841,6 +845,7 @@ void ReadRegDemogFile(const char *RegDemogFile)
}
fclose(dat);
}
}

void SetupPopulation(char* SchoolFile, char* RegDemogFile)
{
Expand Down

0 comments on commit 0a80255

Please sign in to comment.