[Orxonox-commit 5899] r10558 - in code/branches/core7/src: modules/objects modules/objects/triggers orxonox/interfaces orxonox/overlays orxonox/worldentities
landauf at orxonox.net
landauf at orxonox.net
Sat Aug 29 18:45:20 CEST 2015
Author: landauf
Date: 2015-08-29 18:45:20 +0200 (Sat, 29 Aug 2015)
New Revision: 10558
Modified:
code/branches/core7/src/modules/objects/SpaceBoundaries.cc
code/branches/core7/src/modules/objects/triggers/DistanceTrigger.cc
code/branches/core7/src/orxonox/interfaces/PlayerTrigger.h
code/branches/core7/src/orxonox/overlays/OverlayGroup.cc
code/branches/core7/src/orxonox/worldentities/ControllableEntity.cc
code/branches/core7/src/orxonox/worldentities/ControllableEntity.h
Log:
no need to call get() on Weak or StrongPtr. they are automatically converted to normal pointers.
Modified: code/branches/core7/src/modules/objects/SpaceBoundaries.cc
===================================================================
--- code/branches/core7/src/modules/objects/SpaceBoundaries.cc 2015-08-29 16:18:30 UTC (rev 10557)
+++ code/branches/core7/src/modules/objects/SpaceBoundaries.cc 2015-08-29 16:45:20 UTC (rev 10558)
@@ -209,7 +209,7 @@
bool humanItem;
for( std::list<WeakPtr<Pawn> >::iterator current = pawnsIn_.begin(); current != pawnsIn_.end(); current++ )
{
- Pawn* currentPawn = current->get();
+ Pawn* currentPawn = *current;
if( currentPawn && currentPawn->getNode() )
{
distance = this->computeDistance(currentPawn);
Modified: code/branches/core7/src/modules/objects/triggers/DistanceTrigger.cc
===================================================================
--- code/branches/core7/src/modules/objects/triggers/DistanceTrigger.cc 2015-08-29 16:18:30 UTC (rev 10557)
+++ code/branches/core7/src/modules/objects/triggers/DistanceTrigger.cc 2015-08-29 16:45:20 UTC (rev 10558)
@@ -146,9 +146,9 @@
bool DistanceTrigger::checkDistance()
{
// Check whether there is a cached object, it still exists and whether it is still in range, if so nothing further needs to be done.
- if(this->cache_.get() != NULL)
+ if(this->cache_ != NULL)
{
- if((this->cache_.get()->getWorldPosition() - this->getWorldPosition()).length() < this->distance_)
+ if((this->cache_->getWorldPosition() - this->getWorldPosition()).length() < this->distance_)
return true;
else
this->cache_.reset();
Modified: code/branches/core7/src/orxonox/interfaces/PlayerTrigger.h
===================================================================
--- code/branches/core7/src/orxonox/interfaces/PlayerTrigger.h 2015-08-29 16:18:30 UTC (rev 10557)
+++ code/branches/core7/src/orxonox/interfaces/PlayerTrigger.h 2015-08-29 16:45:20 UTC (rev 10558)
@@ -62,7 +62,7 @@
@return Returns a pointer to the Pawn that triggered the PlayerTrigger.
*/
inline Pawn* getTriggeringPawn(void) const
- { return this->pawn_.get(); }
+ { return this->pawn_; }
/**
@brief Returns the player that triggered the PlayerTrigger.
Modified: code/branches/core7/src/orxonox/overlays/OverlayGroup.cc
===================================================================
--- code/branches/core7/src/orxonox/overlays/OverlayGroup.cc 2015-08-29 16:18:30 UTC (rev 10557)
+++ code/branches/core7/src/orxonox/overlays/OverlayGroup.cc 2015-08-29 16:45:20 UTC (rev 10558)
@@ -134,7 +134,7 @@
std::set< StrongPtr<OrxonoxOverlay> >::const_iterator it = hudElements_.begin();
for (unsigned int i = 0; i != index; ++it, ++i)
;
- return it->get();
+ return *it;
}
else
return 0;
Modified: code/branches/core7/src/orxonox/worldentities/ControllableEntity.cc
===================================================================
--- code/branches/core7/src/orxonox/worldentities/ControllableEntity.cc 2015-08-29 16:18:30 UTC (rev 10557)
+++ code/branches/core7/src/orxonox/worldentities/ControllableEntity.cc 2015-08-29 16:45:20 UTC (rev 10558)
@@ -214,7 +214,7 @@
if (this->camera_->getParent() == this && this->cameraPositions_.size() > 0)
{
this->cameraPositions_.front()->attachCamera(this->camera_);
- this->currentCameraPosition_ = this->cameraPositions_.front().get();
+ this->currentCameraPosition_ = this->cameraPositions_.front();
}
else if (this->cameraPositions_.size() > 0)
{
Modified: code/branches/core7/src/orxonox/worldentities/ControllableEntity.h
===================================================================
--- code/branches/core7/src/orxonox/worldentities/ControllableEntity.h 2015-08-29 16:18:30 UTC (rev 10557)
+++ code/branches/core7/src/orxonox/worldentities/ControllableEntity.h 2015-08-29 16:45:20 UTC (rev 10558)
@@ -154,13 +154,13 @@
{ return this->xmlcontroller_; }
inline Controller* getController() const
- { return this->controller_.get(); }
+ { return this->controller_; }
void setController(Controller* val);
virtual void setTarget( WorldEntity* target );
virtual WorldEntity* getTarget()
- { return this->target_.get(); }
+ { return this->target_; }
void setTargetInternal( uint32_t targetID );
inline void setTeam(int team)
More information about the Orxonox-commit
mailing list