Rename private member variables

This commit is contained in:
Daniel Marjamäki 2018-06-17 16:55:02 +02:00
parent c25ab16f5d
commit 074177fc6e
3 changed files with 20 additions and 20 deletions

View File

@ -43,7 +43,7 @@ static std::vector<std::string> getnames(const char *names)
return ret;
}
Library::Library() : allocid(0)
Library::Library() : mAllocId(0)
{
}
@ -157,10 +157,10 @@ Library::Error Library::load(const tinyxml2::XMLDocument &doc)
}
if (allocationId == 0) {
if (nodename == "memory")
while (!ismemory(++allocid));
while (!ismemory(++mAllocId));
else
while (!isresource(++allocid));
allocationId = allocid;
while (!isresource(++mAllocId));
allocationId = mAllocId;
}
// add alloc/dealloc/use functions..
@ -455,7 +455,7 @@ Library::Error Library::load(const tinyxml2::XMLDocument &doc)
podType.sign = *sign;
const std::vector<std::string> names(getnames(name));
for (unsigned int i = 0U; i < names.size(); ++i)
podtypes[names[i]] = podType;
mPodTypes[names[i]] = podType;
}
else if (nodename == "platformtype") {
@ -497,7 +497,7 @@ Library::Error Library::load(const tinyxml2::XMLDocument &doc)
return Error(DUPLICATE_PLATFORM_TYPE, type_name);
return Error(PLATFORM_TYPE_REDEFINED, type_name);
}
platform_types[type_name] = type;
mPlatformTypes[type_name] = type;
} else {
std::set<std::string>::const_iterator it;
for (it = platform.begin(); it != platform.end(); ++it) {
@ -507,7 +507,7 @@ Library::Error Library::load(const tinyxml2::XMLDocument &doc)
return Error(DUPLICATE_PLATFORM_TYPE, type_name);
return Error(PLATFORM_TYPE_REDEFINED, type_name);
}
platforms[*it]._platform_types[type_name] = type;
mPlatforms[*it]._platform_types[type_name] = type;
}
}
}

View File

@ -375,8 +375,8 @@ public:
char sign;
};
const struct PodType *podtype(const std::string &name) const {
const std::map<std::string, struct PodType>::const_iterator it = podtypes.find(name);
return (it != podtypes.end()) ? &(it->second) : nullptr;
const std::map<std::string, struct PodType>::const_iterator it = mPodTypes.find(name);
return (it != mPodTypes.end()) ? &(it->second) : nullptr;
}
struct PlatformType {
@ -418,15 +418,15 @@ public:
};
const PlatformType *platform_type(const std::string &name, const std::string & platform) const {
const std::map<std::string, Platform>::const_iterator it = platforms.find(platform);
if (it != platforms.end()) {
const std::map<std::string, Platform>::const_iterator it = mPlatforms.find(platform);
if (it != mPlatforms.end()) {
const PlatformType * const type = it->second.platform_type(name);
if (type)
return type;
}
const std::map<std::string, PlatformType>::const_iterator it2 = platform_types.find(name);
return (it2 != platform_types.end()) ? &(it2->second) : nullptr;
const std::map<std::string, PlatformType>::const_iterator it2 = mPlatformTypes.find(name);
return (it2 != mPlatformTypes.end()) ? &(it2->second) : nullptr;
}
/**
@ -494,7 +494,7 @@ private:
int mOffset;
std::set<std::string> mBlocks;
};
int allocid;
int mAllocId;
std::set<std::string> mFiles;
std::map<std::string, AllocFunc> mAlloc; // allocation functions
std::map<std::string, AllocFunc> mDealloc; // deallocation functions
@ -510,9 +510,9 @@ private:
std::map<std::string, ExportedFunctions> mExporters; // keywords that export variables/functions to libraries (meta-code/macros)
std::map<std::string, std::set<std::string> > mImporters; // keywords that import variables/functions
std::map<std::string, int> mReflection; // invocation of reflection
std::map<std::string, struct PodType> podtypes; // pod types
std::map<std::string, PlatformType> platform_types; // platform independent typedefs
std::map<std::string, Platform> platforms; // platform dependent typedefs
std::map<std::string, struct PodType> mPodTypes; // pod types
std::map<std::string, PlatformType> mPlatformTypes; // platform independent typedefs
std::map<std::string, Platform> mPlatforms; // platform dependent typedefs
const ArgumentChecks * getarg(const Token *ftok, int argnr) const;

View File

@ -5773,8 +5773,8 @@ private:
Settings settingsWin64;
settingsWin64.platformType = Settings::Win64;
const Library::PodType u32 = { 4, 'u' };
settingsWin64.library.podtypes["u32"] = u32;
settingsWin64.library.podtypes["xyz::x"] = u32;
settingsWin64.library.mPodTypes["u32"] = u32;
settingsWin64.library.mPodTypes["xyz::x"] = u32;
ValueType vt;
ASSERT_EQUALS(true, vt.fromLibraryType("u32", &settingsWin64));
ASSERT_EQUALS(true, vt.fromLibraryType("xyz::x", &settingsWin64));
@ -5789,7 +5789,7 @@ private:
settingsUnix32.platformType = Settings::Unix32;
Library::PlatformType s32;
s32.mType = "int";
settingsUnix32.library.platforms[settingsUnix32.platformString()]._platform_types["s32"] = s32;
settingsUnix32.library.mPlatforms[settingsUnix32.platformString()]._platform_types["s32"] = s32;
ValueType vt;
ASSERT_EQUALS(true, vt.fromLibraryType("s32", &settingsUnix32));
ASSERT_EQUALS(ValueType::Type::INT, vt.type);