mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-06-21 06:05:38 +00:00
refactor: expand AUTO_VAR macro
This commit is contained in:
@@ -13,10 +13,10 @@ bool Sensing::canSee(std::shared_ptr<Entity> target) {
|
||||
// if ( find(seen.begin(), seen.end(), target) != seen.end() ) return true;
|
||||
// if ( find(unseen.begin(), unseen.end(), target) != unseen.end()) return
|
||||
// false;
|
||||
for (AUTO_VAR(it, seen.begin()); it != seen.end(); ++it) {
|
||||
for (auto it = seen.begin(); it != seen.end(); ++it) {
|
||||
if (target == (*it).lock()) return true;
|
||||
}
|
||||
for (AUTO_VAR(it, unseen.begin()); it != unseen.end(); ++it) {
|
||||
for (auto it = unseen.begin(); it != unseen.end(); ++it) {
|
||||
if (target == (*it).lock()) return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user