Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions indra/newview/gltf/primitive.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ namespace LL
//closest to start. Moves end to the point of intersection. Returns nullptr if no intersection.
//Line segment must be in the same coordinate frame as this Primitive
const LLVolumeTriangle* lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point
LLVector4a* normal = NULL, // return the surface normal at the intersection point
LLVector4a* tangent = NULL // return the surface tangent at the intersection point
LLVector4a* intersection = nullptr, // return the intersection point
LLVector2* tex_coord = nullptr, // return the texture coordinates of the intersection point
LLVector4a* normal = nullptr, // return the surface normal at the intersection point
LLVector4a* tangent = nullptr // return the surface tangent at the intersection point
);

void serialize(boost::json::object& obj) const;
Expand Down
18 changes: 9 additions & 9 deletions indra/newview/gltfscenemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -865,22 +865,22 @@ bool GLTFSceneManager::lineSegmentIntersect(LLVOVolume* obj, Asset* asset, const
LLVector2 tc;
LLVector4a tn;

if (intersection != NULL)
if (intersection != nullptr)
{
p = *intersection;
}

if (tex_coord != NULL)
if (tex_coord != nullptr)
{
tc = *tex_coord;
}

if (normal != NULL)
if (normal != nullptr)
{
n = *normal;
}

if (tangent != NULL)
if (tangent != nullptr)
{
tn = *tangent;
}
Expand All @@ -890,24 +890,24 @@ bool GLTFSceneManager::lineSegmentIntersect(LLVOVolume* obj, Asset* asset, const
if (hit_node_index >= 0)
{
local_end = p;
if (node_hit != NULL)
if (node_hit != nullptr)
{
*node_hit = hit_node_index;
}

if (intersection != NULL)
if (intersection != nullptr)
{
asset_to_agent.affineTransform(p, *intersection);
}

if (normal != NULL)
if (normal != nullptr)
{
LLVector3 v_n(n.getF32ptr());
normal->load3(obj->volumeDirectionToAgent(v_n).mV);
(*normal).normalize3fast();
}

if (tangent != NULL)
if (tangent != nullptr)
{
LLVector3 v_tn(tn.getF32ptr());

Expand All @@ -922,7 +922,7 @@ bool GLTFSceneManager::lineSegmentIntersect(LLVOVolume* obj, Asset* asset, const
(*tangent).normalize3fast();
}

if (tex_coord != NULL)
if (tex_coord != nullptr)
{
*tex_coord = tc;
}
Expand Down
2 changes: 1 addition & 1 deletion indra/newview/llaccountingcostmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ void LLAccountingCostManager::accountingCostCoro(std::string url,
return;
}

LLAccountingCostObserver* observer = NULL;
LLAccountingCostObserver* observer = nullptr;

// do/while(false) allows error conditions to break out of following
// block while normal flow goes forward once.
Expand Down
56 changes: 28 additions & 28 deletions indra/newview/llagent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ bool LLAgent::isActionAllowed(const LLSD& sdname)
{
bool allow_agent_voice = false;
LLVoiceChannel* channel = LLVoiceChannel::getCurrentVoiceChannel();
if (channel != NULL)
if (channel != nullptr)
{
if (channel->getSessionName().empty() && channel->getSessionID().isNull())
{
Expand Down Expand Up @@ -404,7 +404,7 @@ LLAgent::LLAgent() :
mLastKnownResponseMaturity(SIM_ACCESS_MIN),
mHttpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID),
mTeleportState(TELEPORT_NONE),
mRegionp(NULL),
mRegionp(nullptr),
mInterestListMode(IL_MODE_DEFAULT),

mAgentOriginGlobal(),
Expand Down Expand Up @@ -519,9 +519,9 @@ void LLAgent::init()
//-----------------------------------------------------------------------------
void LLAgent::cleanup()
{
mRegionp = NULL;
mTeleportRequest = NULL;
mTeleportCanceled = NULL;
mRegionp = nullptr;
mTeleportRequest = nullptr;
mTeleportCanceled = nullptr;
if (mTeleportFinishedSlot.connected())
{
mTeleportFinishedSlot.disconnect();
Expand All @@ -540,16 +540,16 @@ LLAgent::~LLAgent()
cleanup();

delete mMouselookModeInSignal;
mMouselookModeInSignal = NULL;
mMouselookModeInSignal = nullptr;
delete mMouselookModeOutSignal;
mMouselookModeOutSignal = NULL;
mMouselookModeOutSignal = nullptr;

delete mAgentAccess;
mAgentAccess = NULL;
mAgentAccess = nullptr;
delete mEffectColor;
mEffectColor = NULL;
mEffectColor = nullptr;
delete mTeleportSourceSLURL;
mTeleportSourceSLURL = NULL;
mTeleportSourceSLURL = nullptr;
}

// Handle any actions that need to be performed when the main app gains focus
Expand Down Expand Up @@ -1644,7 +1644,7 @@ void LLAgent::startAutoPilotGlobal(
LLVector3d intersection;
LLVector3 normal;
LLViewerObject *hit_obj;
F32 heightDelta = LLWorld::getInstance()->resolveStepHeightGlobal(NULL, target_global, trace_target, intersection, normal, &hit_obj);
F32 heightDelta = LLWorld::getInstance()->resolveStepHeightGlobal(nullptr, target_global, trace_target, intersection, normal, &hit_obj);

if (stop_distance > 0.f)
{
Expand Down Expand Up @@ -1720,7 +1720,7 @@ void LLAgent::setAutoPilotTargetGlobal(const LLVector3d &target_global)
LLVector3 groundNorm;
LLViewerObject *obj;

LLWorld::getInstance()->resolveStepHeightGlobal(NULL, target_global, traceEndPt, targetOnGround, groundNorm, &obj);
LLWorld::getInstance()->resolveStepHeightGlobal(nullptr, target_global, traceEndPt, targetOnGround, groundNorm, &obj);
// Note: this might malfunction for sitting agent, since pelvis stays same, but agent's position becomes lower
// But for autopilot to work we assume that agent is standing and ready to go.
F64 target_height = llmax((F64)gAgentAvatarp->getPelvisToFoot(), target_global.mdV[VZ] - targetOnGround.mdV[VZ]);
Expand Down Expand Up @@ -1748,9 +1748,9 @@ void LLAgent::startFollowPilot(const LLUUID &leader_id, bool allow_flying, F32 s

startAutoPilotGlobal(object->getPositionGlobal(),
std::string(), // behavior_name
NULL, // target_rotation
NULL, // finish_callback
NULL, // callback_data
nullptr, // target_rotation
nullptr, // finish_callback
nullptr, // callback_data
stop_distance,
0.03f, // rotation_threshold
allow_flying);
Expand Down Expand Up @@ -1779,7 +1779,7 @@ void LLAgent::stopAutoPilot(bool user_cancel)
if (mAutoPilotFinishedCallback)
{
mAutoPilotFinishedCallback(!user_cancel && dist_vec(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal) < mAutoPilotStopDistance, mAutoPilotCallbackData);
mAutoPilotFinishedCallback = NULL;
mAutoPilotFinishedCallback = nullptr;
}
mLeaderID = LLUUID::null;

Expand Down Expand Up @@ -2372,7 +2372,7 @@ void LLAgent::endAnimationUpdateUI()
gAgentCamera.clearCameraLag();

// JC - Added for always chat in third person option
gFocusMgr.setKeyboardFocus(NULL);
gFocusMgr.setKeyboardFocus(nullptr);

LLToolMgr::getInstance()->setCurrentToolset(gMouselookToolset);

Expand Down Expand Up @@ -2894,7 +2894,7 @@ void LLAgent::sendMaturityPreferenceToServer(U8 pPreferredMaturity)
mLastKnownRequestMaturity = pPreferredMaturity;

// If we don't have a region, report it as an error
if (getRegion() == NULL)
if (getRegion() == nullptr)
{
LL_WARNS("Agent") << "Region is not defined, can not change Maturity setting." << LL_ENDL;
return;
Expand Down Expand Up @@ -3259,7 +3259,7 @@ void LLAgent::sendAnimationRequests(const std::vector<LLUUID> &anim_ids, EAnimRe
}

msg->nextBlockFast(_PREHASH_PhysicalAvatarEventList);
msg->addBinaryDataFast(_PREHASH_TypeData, NULL, 0);
msg->addBinaryDataFast(_PREHASH_TypeData, nullptr, 0);
if (num_valid_anims)
{
sendReliableMessage();
Expand All @@ -3284,7 +3284,7 @@ void LLAgent::sendAnimationRequest(const LLUUID &anim_id, EAnimRequest request)
msg->addBOOLFast(_PREHASH_StartAnim, request == ANIM_REQUEST_START);

msg->nextBlockFast(_PREHASH_PhysicalAvatarEventList);
msg->addBinaryDataFast(_PREHASH_TypeData, NULL, 0);
msg->addBinaryDataFast(_PREHASH_TypeData, nullptr, 0);
sendReliableMessage();
}

Expand All @@ -3308,7 +3308,7 @@ void LLAgent::sendAnimationStateReset()
msg->addBOOLFast(_PREHASH_StartAnim, false);

msg->nextBlockFast(_PREHASH_PhysicalAvatarEventList);
msg->addBinaryDataFast(_PREHASH_TypeData, NULL, 0);
msg->addBinaryDataFast(_PREHASH_TypeData, nullptr, 0);
sendReliableMessage();
}

Expand Down Expand Up @@ -4027,7 +4027,7 @@ bool LLAgent::teleportCore(bool is_local)

bool LLAgent::hasRestartableFailedTeleportRequest()
{
return ((mTeleportRequest != NULL) && (mTeleportRequest->getStatus() == LLTeleportRequest::kFailed) &&
return ((mTeleportRequest != nullptr) && (mTeleportRequest->getStatus() == LLTeleportRequest::kFailed) &&
mTeleportRequest->canRestartTeleport());
}

Expand Down Expand Up @@ -4065,7 +4065,7 @@ void LLAgent::sheduleTeleportIM()

bool LLAgent::hasPendingTeleportRequest()
{
return ((mTeleportRequest != NULL) &&
return ((mTeleportRequest != nullptr) &&
((mTeleportRequest->getStatus() == LLTeleportRequest::kPending) ||
(mTeleportRequest->getStatus() == LLTeleportRequest::kRestartPending)));
}
Expand Down Expand Up @@ -4290,7 +4290,7 @@ void LLAgent::doTeleportViaLandmark(const LLUUID& landmark_asset_id)
}

bool is_local(false);
if (LLLandmark* landmark = gLandmarkList.getAsset(landmark_asset_id, NULL))
if (LLLandmark* landmark = gLandmarkList.getAsset(landmark_asset_id, nullptr))
{
LLVector3d pos_global;
landmark->getGlobalPos(pos_global);
Expand Down Expand Up @@ -4380,7 +4380,7 @@ void LLAgent::teleportCancel()

void LLAgent::restoreCanceledTeleportRequest()
{
if (mTeleportCanceled != NULL)
if (mTeleportCanceled != nullptr)
{
LL_INFOS() << "Restoring canceled teleport request, setting state to TELEPORT_REQUESTED" << LL_ENDL;
gAgent.setTeleportState( LLAgent::TELEPORT_REQUESTED );
Expand Down Expand Up @@ -4870,12 +4870,12 @@ void LLAgent::parseTeleportMessages(const std::string& xml_filename)
}

for (LLXMLNode* message_set = root->getFirstChild();
message_set != NULL;
message_set != nullptr;
message_set = message_set->getNextSibling())
{
if ( !message_set->hasName("message_set") ) continue;

std::map<std::string, std::string> *teleport_msg_map = NULL;
std::map<std::string, std::string> *teleport_msg_map = nullptr;
std::string message_set_name;

if ( message_set->getAttributeString("name", message_set_name) )
Expand All @@ -4896,7 +4896,7 @@ void LLAgent::parseTeleportMessages(const std::string& xml_filename)

std::string message_name;
for (LLXMLNode* message_node = message_set->getFirstChild();
message_node != NULL;
message_node != nullptr;
message_node = message_node->getNextSibling())
{
if ( message_node->hasName("message") &&
Expand Down
8 changes: 4 additions & 4 deletions indra/newview/llagent.h
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ class LLAgent : public LLOldEvents::LLObservable
void sendRevokePermissions(const LLUUID & target, U32 permissions);

void endAnimationUpdateUI();
void unpauseAnimation() { mPauseRequest = NULL; }
void unpauseAnimation() { mPauseRequest = nullptr; }
bool getCustomAnim() const { return mCustomAnim; }
void setCustomAnim(bool anim) { mCustomAnim = anim; }

Expand Down Expand Up @@ -572,8 +572,8 @@ class LLAgent : public LLOldEvents::LLObservable

void startAutoPilotGlobal(const LLVector3d &pos_global,
const std::string& behavior_name = std::string(),
const LLQuaternion *target_rotation = NULL,
void (*finish_callback)(bool, void *) = NULL, void *callback_data = NULL,
const LLQuaternion *target_rotation = nullptr,
void (*finish_callback)(bool, void *) = nullptr, void *callback_data = nullptr,
F32 stop_distance = 0.f, F32 rotation_threshold = 0.03f,
bool allow_flying = true);
void startFollowPilot(const LLUUID &leader_id, bool allow_flying = true, F32 stop_distance = 0.5f);
Expand Down Expand Up @@ -645,7 +645,7 @@ class LLAgent : public LLOldEvents::LLObservable
void teleportViaLocationLookAt(const LLVector3d& pos_global);// To a global location, preserving camera rotation
void teleportCancel(); // May or may not be allowed by server
void restoreCanceledTeleportRequest();
bool canRestoreCanceledTeleport() { return mTeleportCanceled != NULL; }
bool canRestoreCanceledTeleport() { return mTeleportCanceled != nullptr; }
bool getTeleportKeepsLookAt() { return mbTeleportKeepsLookAt; } // Whether look-at reset after teleport
protected:
bool teleportCore(bool is_local = false); // Stuff for all teleports; returns true if the teleport can proceed
Expand Down
Loading