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:
@ -80,17 +80,9 @@ plRegistryPageNode::plRegistryPageNode(const plLocation& location, const plStrin
|
||||
{
|
||||
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
|
||||
// of age_page.extension
|
||||
path += fPageInfo.GetAge();
|
||||
path += "_District_";
|
||||
path += fPageInfo.GetPage();
|
||||
path += ".prp";
|
||||
|
||||
fPath = path;
|
||||
fPath = plString::Format("%s%x%s_District_%s.prp", dataPath.c_str(), PATH_SEPARATOR_STR, fPageInfo.GetAge().c_str(), fPageInfo.GetPage().c_str());
|
||||
}
|
||||
|
||||
plRegistryPageNode::~plRegistryPageNode()
|
||||
@ -137,7 +129,7 @@ hsStream* plRegistryPageNode::OpenStream()
|
||||
{
|
||||
if (fOpenRequests == 0)
|
||||
{
|
||||
if (!fStream.Open(fPath.c_str(), "rb"))
|
||||
if (!fStream.Open_TEMP(fPath, "rb"))
|
||||
return nil;
|
||||
}
|
||||
fOpenRequests++;
|
||||
|
@ -1770,7 +1770,7 @@ bool plResManager::IteratePages(plRegistryPageIterator* iterator, const plString
|
||||
if (page->GetPageInfo().GetLocation() == plLocation::kGlobalFixedLoc)
|
||||
continue;
|
||||
|
||||
if (!ageToRestrictTo.IsNull() || page->GetPageInfo().GetAge().CompareI(ageToRestrictTo) == 0)
|
||||
if (ageToRestrictTo.IsNull() || page->GetPageInfo().GetAge().CompareI(ageToRestrictTo) == 0)
|
||||
{
|
||||
if (!iterator->EatPage(page))
|
||||
{
|
||||
|
@ -155,7 +155,7 @@ public:
|
||||
// Single page version
|
||||
bool IterateKeys(plRegistryKeyIterator* iterator, const plLocation& pageToRestrictTo);
|
||||
// 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
|
||||
bool IterateAllPages(plRegistryPageIterator* iterator);
|
||||
|
||||
|
Reference in New Issue
Block a user