mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-05-30 13:35:58 +00:00
refactor: expand AUTO_VAR macro
This commit is contained in:
@@ -47,7 +47,7 @@ void StructureFeatureIO::staticCtor() {
|
||||
}
|
||||
|
||||
std::wstring StructureFeatureIO::getEncodeId(StructureStart* start) {
|
||||
AUTO_VAR(it, startClassIdMap.find(start->GetType()));
|
||||
auto it = startClassIdMap.find(start->GetType());
|
||||
if (it != startClassIdMap.end()) {
|
||||
return it->second;
|
||||
} else {
|
||||
@@ -56,7 +56,7 @@ std::wstring StructureFeatureIO::getEncodeId(StructureStart* start) {
|
||||
}
|
||||
|
||||
std::wstring StructureFeatureIO::getEncodeId(StructurePiece* piece) {
|
||||
AUTO_VAR(it, pieceClassIdMap.find(piece->GetType()));
|
||||
auto it = pieceClassIdMap.find(piece->GetType());
|
||||
if (it != pieceClassIdMap.end()) {
|
||||
return it->second;
|
||||
} else {
|
||||
@@ -68,7 +68,7 @@ StructureStart* StructureFeatureIO::loadStaticStart(CompoundTag* tag,
|
||||
Level* level) {
|
||||
StructureStart* start = NULL;
|
||||
|
||||
AUTO_VAR(it, startIdClassMap.find(tag->getString(L"id")));
|
||||
auto it = startIdClassMap.find(tag->getString(L"id"));
|
||||
if (it != startIdClassMap.end()) {
|
||||
start = (it->second)();
|
||||
}
|
||||
@@ -86,7 +86,7 @@ StructurePiece* StructureFeatureIO::loadStaticPiece(CompoundTag* tag,
|
||||
Level* level) {
|
||||
StructurePiece* piece = NULL;
|
||||
|
||||
AUTO_VAR(it, pieceIdClassMap.find(tag->getString(L"id")));
|
||||
auto it = pieceIdClassMap.find(tag->getString(L"id"));
|
||||
if (it != pieceIdClassMap.end()) {
|
||||
piece = (it->second)();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user