Changeset 10768 for code/branches/cpp11_v2/src/orxonox/weaponsystem
- Timestamp:
- Nov 6, 2015, 10:54:34 PM (9 years ago)
- Location:
- code/branches/cpp11_v2/src/orxonox/weaponsystem
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/orxonox/weaponsystem/Munition.cc
r9667 r10768 65 65 // For separated magazines we definitively need a given user 66 66 if (!user) 67 return 0;67 return nullptr; 68 68 69 69 // Use the map to get the magazine assigned to the given user … … 79 79 } 80 80 81 return 0;81 return nullptr; 82 82 } 83 83 … … 236 236 // If we don't use separate magazines, set user to 0 237 237 if (!this->bUseSeparateMagazines_) 238 user = 0;238 user = nullptr; 239 239 240 240 // Remove the current magazine for the given user … … 442 442 // If we don't use separate magazines, set user to 0 443 443 if (!this->bUseSeparateMagazines_) 444 user = 0;444 user = nullptr; 445 445 446 446 // Remove the current magazine for the given user -
code/branches/cpp11_v2/src/orxonox/weaponsystem/Weapon.cc
r10650 r10768 45 45 RegisterObject(Weapon); 46 46 47 this->weaponPack_ = 0;48 this->weaponSlot_ = 0;47 this->weaponPack_ = nullptr; 48 this->weaponSlot_ = nullptr; 49 49 this->bReloading_ = false; 50 50 this->reloadingWeaponmode_ = WeaponSystem::WEAPON_MODE_UNASSIGNED; … … 92 92 ++i; 93 93 } 94 return 0;94 return nullptr; 95 95 } 96 96 -
code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponMode.cc
r10650 r10768 51 51 RegisterObject(WeaponMode); 52 52 53 this->weapon_ = 0;53 this->weapon_ = nullptr; 54 54 this->mode_ = WeaponSystem::WEAPON_MODE_UNASSIGNED; 55 55 56 this->munition_ = 0;56 this->munition_ = nullptr; 57 57 this->initialMunition_ = 0; 58 58 this->initialMagazines_ = 0; … … 232 232 } 233 233 else 234 this->munition_ = 0;234 this->munition_ = nullptr; 235 235 } 236 236 -
code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponPack.cc
r10650 r10768 44 44 RegisterObject(WeaponPack); 45 45 46 this->weaponSystem_ = 0;46 this->weaponSystem_ = nullptr; 47 47 } 48 48 … … 107 107 assert(it != this->weapons_.end()); 108 108 this->weapons_.erase(it); 109 weapon->setWeaponPack( 0);109 weapon->setWeaponPack(nullptr); 110 110 } 111 111 … … 121 121 } 122 122 123 return 0;123 return nullptr; 124 124 } 125 125 … … 139 139 ++i; 140 140 } 141 return 0;141 return nullptr; 142 142 } 143 143 -
code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponSet.cc
r10650 r10768 43 43 RegisterObject(WeaponSet); 44 44 45 this->weaponSystem_ = 0;45 this->weaponSystem_ = nullptr; 46 46 this->desiredFiremode_ = WeaponSystem::FIRE_MODE_UNASSIGNED; 47 47 } -
code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponSlot.cc
r10648 r10768 43 43 RegisterObject(WeaponSlot); 44 44 45 this->weaponSystem_ = 0;46 this->weapon_ = 0;45 this->weaponSystem_ = nullptr; 46 this->weapon_ = nullptr; 47 47 48 48 this->setSyncMode(ObjectDirection::None); … … 88 88 if (this->weapon_) 89 89 { 90 this->weapon_->setWeaponSlot( 0);91 this->weapon_ = 0;90 this->weapon_->setWeaponSlot(nullptr); 91 this->weapon_ = nullptr; 92 92 } 93 93 } -
code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponSlot.h
r10650 r10768 74 74 */ 75 75 inline bool isOccupied() const 76 { return (this->weapon_ != 0); }76 { return (this->weapon_ != nullptr); } 77 77 78 78 inline void setWeaponSystem(WeaponSystem * weaponSystem) -
code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponSystem.cc
r10650 r10768 52 52 RegisterObject(WeaponSystem); 53 53 54 this->pawn_ = 0;54 this->pawn_ = nullptr; 55 55 } 56 56 … … 60 60 { 61 61 if (this->pawn_) 62 this->pawn_->setWeaponSystem( 0);62 this->pawn_->setWeaponSystem(nullptr); 63 63 64 64 while (!this->weaponSets_.empty()) … … 112 112 return (*it); 113 113 } 114 return 0;114 return nullptr; 115 115 } 116 116 … … 159 159 return it->second; 160 160 } 161 return 0;161 return nullptr; 162 162 } 163 163 … … 213 213 // Remove all weapons from their WeaponSlot 214 214 unsigned int i = 0; 215 Weapon* weapon = 0;215 Weapon* weapon = nullptr; 216 216 while ((weapon = wPack->getWeapon(i++))) 217 217 if (weapon->getWeaponSlot()) … … 237 237 return (*it); 238 238 } 239 return 0;239 return nullptr; 240 240 } 241 241 … … 303 303 { 304 304 if (!identifier || !identifier->getIdentifier()) 305 return 0;305 return nullptr; 306 306 307 307 std::map<Identifier *, Munition *>::iterator it = this->munitions_.find(identifier->getIdentifier()); … … 318 318 else 319 319 { 320 return 0;320 return nullptr; 321 321 } 322 322 }
Note: See TracChangeset
for help on using the changeset viewer.