mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 07:12:40 +02:00
fix readability of agent dereference
This commit is contained in:
parent
da6bbacc8e
commit
507f39a052
2 changed files with 5 additions and 5 deletions
|
@ -134,7 +134,7 @@ int main(int argc, const char * argv[])
|
|||
// this is an agent of which there can be multiple, just add them to the packet
|
||||
// don't send avatar agents to other avatars, that will come from avatar mixer
|
||||
if (agentType != AGENT_TYPE_AVATAR || agent->getType() != AGENT_TYPE_AVATAR) {
|
||||
currentBufferPos = addAgentToBroadcastPacket(currentBufferPos, &*agent);
|
||||
currentBufferPos = addAgentToBroadcastPacket(currentBufferPos, &(*agent));
|
||||
}
|
||||
|
||||
} else {
|
||||
|
@ -142,7 +142,7 @@ int main(int argc, const char * argv[])
|
|||
if (newestSoloAgents[agent->getType()] == NULL ||
|
||||
newestSoloAgents[agent->getType()]->getFirstRecvTimeUsecs() < agent->getFirstRecvTimeUsecs()) {
|
||||
// we have to set the newer solo agent to add it to the broadcast later
|
||||
newestSoloAgents[agent->getType()] = &*agent;
|
||||
newestSoloAgents[agent->getType()] = &(*agent);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -173,7 +173,7 @@ int AgentList::updateAgentWithData(Agent *agent, unsigned char *packetData, int
|
|||
Agent* AgentList::agentWithAddress(sockaddr *senderAddress) {
|
||||
for(AgentList::iterator agent = begin(); agent != end(); agent++) {
|
||||
if (agent->getActiveSocket() != NULL && socketMatch(agent->getActiveSocket(), senderAddress)) {
|
||||
return &*agent;
|
||||
return &(*agent);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -183,7 +183,7 @@ Agent* AgentList::agentWithAddress(sockaddr *senderAddress) {
|
|||
Agent* AgentList::agentWithID(uint16_t agentID) {
|
||||
for(AgentList::iterator agent = begin(); agent != end(); agent++) {
|
||||
if (agent->getAgentId() == agentID) {
|
||||
return &*agent;
|
||||
return &(*agent);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -317,7 +317,7 @@ Agent* AgentList::soloAgentOfType(char agentType) {
|
|||
if (memchr(SOLO_AGENT_TYPES, agentType, sizeof(SOLO_AGENT_TYPES)) != NULL) {
|
||||
for(AgentList::iterator agent = begin(); agent != end(); agent++) {
|
||||
if (agent->getType() == agentType) {
|
||||
return &*agent;
|
||||
return &(*agent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue