1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-17 18:59:09 +00:00

Fix issues pointed out in code review.

This commit is contained in:
Darryl Pogue
2013-01-05 22:42:55 -08:00
parent 4dd06d1e7e
commit cd53cf180d
3 changed files with 4 additions and 12 deletions

View File

@ -80,17 +80,9 @@ plRegistryPageNode::plRegistryPageNode(const plLocation& location, const plStrin
{ {
fPageInfo.SetStrings(age, page); fPageInfo.SetStrings(age, page);
plString path = dataPath;
path += PATH_SEPARATOR_STR;
// Time to construct our actual file name. For now, we'll use the same old format // Time to construct our actual file name. For now, we'll use the same old format
// of age_page.extension // of age_page.extension
path += fPageInfo.GetAge(); fPath = plString::Format("%s%x%s_District_%s.prp", dataPath.c_str(), PATH_SEPARATOR_STR, fPageInfo.GetAge().c_str(), fPageInfo.GetPage().c_str());
path += "_District_";
path += fPageInfo.GetPage();
path += ".prp";
fPath = path;
} }
plRegistryPageNode::~plRegistryPageNode() plRegistryPageNode::~plRegistryPageNode()
@ -137,7 +129,7 @@ hsStream* plRegistryPageNode::OpenStream()
{ {
if (fOpenRequests == 0) if (fOpenRequests == 0)
{ {
if (!fStream.Open(fPath.c_str(), "rb")) if (!fStream.Open_TEMP(fPath, "rb"))
return nil; return nil;
} }
fOpenRequests++; fOpenRequests++;

View File

@ -1770,7 +1770,7 @@ bool plResManager::IteratePages(plRegistryPageIterator* iterator, const plString
if (page->GetPageInfo().GetLocation() == plLocation::kGlobalFixedLoc) if (page->GetPageInfo().GetLocation() == plLocation::kGlobalFixedLoc)
continue; continue;
if (!ageToRestrictTo.IsNull() || page->GetPageInfo().GetAge().CompareI(ageToRestrictTo) == 0) if (ageToRestrictTo.IsNull() || page->GetPageInfo().GetAge().CompareI(ageToRestrictTo) == 0)
{ {
if (!iterator->EatPage(page)) if (!iterator->EatPage(page))
{ {

View File

@ -155,7 +155,7 @@ public:
// Single page version // Single page version
bool IterateKeys(plRegistryKeyIterator* iterator, const plLocation& pageToRestrictTo); bool IterateKeys(plRegistryKeyIterator* iterator, const plLocation& pageToRestrictTo);
// Iterate through loaded pages // Iterate through loaded pages
bool IteratePages(plRegistryPageIterator* iterator, const plString& ageToRestrictTo = nil); bool IteratePages(plRegistryPageIterator* iterator, const plString& ageToRestrictTo = "");
// Iterate through ALL pages, loaded or not // Iterate through ALL pages, loaded or not
bool IterateAllPages(plRegistryPageIterator* iterator); bool IterateAllPages(plRegistryPageIterator* iterator);