diff --git a/indra/llmath/llquantize.h b/indra/llmath/llquantize.h
index 7d8337978f..7f9161ac7a 100755
--- a/indra/llmath/llquantize.h
+++ b/indra/llmath/llquantize.h
@@ -117,7 +117,7 @@ inline U32 F32_to_U32(F32 val, F32 lower, F32 upper)
val -= lower;
val /= (upper - lower);
- return (U32)(llround(val*U24MAX));
+ return (U32)(ll_round(val*U24MAX));
}
//
diff --git a/indra/newview/chatbar_as_cmdline.cpp b/indra/newview/chatbar_as_cmdline.cpp
index 040e19f304..5bbadc87d9 100644
--- a/indra/newview/chatbar_as_cmdline.cpp
+++ b/indra/newview/chatbar_as_cmdline.cpp
@@ -794,9 +794,9 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge
if (revised_text.length() > command.length() + 1) //Typing this command with no argument was causing a crash. -Madgeek
{
LLVector3d agentPos = gAgent.getPositionGlobal();
- S32 agent_x = llround( (F32)fmod( agentPos.mdV[VX], (F64)REGION_WIDTH_METERS ) );
- S32 agent_y = llround( (F32)fmod( agentPos.mdV[VY], (F64)REGION_WIDTH_METERS ) );
- S32 agent_z = llround( (F32)agentPos.mdV[VZ] );
+ S32 agent_x = ll_round( (F32)fmod( agentPos.mdV[VX], (F64)REGION_WIDTH_METERS ) );
+ S32 agent_y = ll_round( (F32)fmod( agentPos.mdV[VY], (F64)REGION_WIDTH_METERS ) );
+ S32 agent_z = ll_round( (F32)agentPos.mdV[VZ] );
std::string region_name = LLWeb::escapeURL(revised_text.substr(command.length() + 1));
std::string url;
diff --git a/indra/newview/fsfloatersearch.cpp b/indra/newview/fsfloatersearch.cpp
index 3315cf509a..c7b7b4650d 100644
--- a/indra/newview/fsfloatersearch.cpp
+++ b/indra/newview/fsfloatersearch.cpp
@@ -434,9 +434,9 @@ void FSFloaterSearch::displayParcelDetails(const LLParcelData& parcel_data)
S32 region_x;
S32 region_y;
S32 region_z;
- region_x = llround(parcel_data.global_x) % REGION_WIDTH_UNITS;
- region_y = llround(parcel_data.global_y) % REGION_WIDTH_UNITS;
- region_z = llround(parcel_data.global_z);
+ region_x = ll_round(parcel_data.global_x) % REGION_WIDTH_UNITS;
+ region_y = ll_round(parcel_data.global_y) % REGION_WIDTH_UNITS;
+ region_z = ll_round(parcel_data.global_z);
// HACK: Flag 0x2 == adult region,
// Flag 0x1 == mature region, otherwise assume PG
if (parcel_data.flags & 0x2)
@@ -560,9 +560,9 @@ void FSFloaterSearch::displayEventDetails(U32 eventId, F64 eventEpoch, const std
S32 region_x;
S32 region_y;
S32 region_z;
- region_x = llround(eventGlobalPos.mdV[VX]) % REGION_WIDTH_UNITS;
- region_y = llround(eventGlobalPos.mdV[VY]) % REGION_WIDTH_UNITS;
- region_z = llround(eventGlobalPos.mdV[VZ]);
+ region_x = ll_round(eventGlobalPos.mdV[VX]) % REGION_WIDTH_UNITS;
+ region_y = ll_round(eventGlobalPos.mdV[VY]) % REGION_WIDTH_UNITS;
+ region_z = ll_round(eventGlobalPos.mdV[VZ]);
LLStringUtil::format_map_t map;
map["DURATION"] = llformat("%d:%.2d", eventDuration / 60, eventDuration % 60);
map["LOCATION"] = llformat("%s (%d, %d, %d)", simName.c_str(), region_x, region_y, region_z);
diff --git a/indra/newview/fspanelclassified.cpp b/indra/newview/fspanelclassified.cpp
index fac18a055d..27acc3211b 100644
--- a/indra/newview/fspanelclassified.cpp
+++ b/indra/newview/fspanelclassified.cpp
@@ -477,9 +477,9 @@ std::string FSPanelClassifiedInfo::createLocationText(
if (!pos_global.isNull())
{
- S32 region_x = llround((F32)pos_global.mdV[VX]) % REGION_WIDTH_UNITS;
- S32 region_y = llround((F32)pos_global.mdV[VY]) % REGION_WIDTH_UNITS;
- S32 region_z = llround((F32)pos_global.mdV[VZ]);
+ S32 region_x = ll_round((F32)pos_global.mdV[VX]) % REGION_WIDTH_UNITS;
+ S32 region_y = ll_round((F32)pos_global.mdV[VY]) % REGION_WIDTH_UNITS;
+ S32 region_z = ll_round((F32)pos_global.mdV[VZ]);
location_text.append(llformat(" (%d, %d, %d)", region_x, region_y, region_z));
}
diff --git a/indra/newview/fspanelprofile.cpp b/indra/newview/fspanelprofile.cpp
index 627e7b95e9..4d01f3e794 100644
--- a/indra/newview/fspanelprofile.cpp
+++ b/indra/newview/fspanelprofile.cpp
@@ -1582,9 +1582,9 @@ std::string FSPanelPick::createLocationText(const std::string& owner_name, const
if (!pos_global.isNull())
{
- S32 region_x = llround((F32)pos_global.mdV[VX]) % REGION_WIDTH_UNITS;
- S32 region_y = llround((F32)pos_global.mdV[VY]) % REGION_WIDTH_UNITS;
- S32 region_z = llround((F32)pos_global.mdV[VZ]);
+ S32 region_x = ll_round((F32)pos_global.mdV[VX]) % REGION_WIDTH_UNITS;
+ S32 region_y = ll_round((F32)pos_global.mdV[VY]) % REGION_WIDTH_UNITS;
+ S32 region_z = ll_round((F32)pos_global.mdV[VZ]);
location_text.append(llformat(" (%d, %d, %d)", region_x, region_y, region_z));
}
return location_text;
diff --git a/indra/newview/fsslurl.cpp b/indra/newview/fsslurl.cpp
index c52ed79457..c727fae684 100644
--- a/indra/newview/fsslurl.cpp
+++ b/indra/newview/fsslurl.cpp
@@ -425,9 +425,9 @@ LLSLURL::LLSLURL(const std::string& grid, const std::string& region, const LLVec
mGrid = grid;
mRegion = region;
// FIRE-8063 - Aurora sim var region teleports
- //S32 x = llround( (F32)fmod( position[VX], (F32)REGION_WIDTH_METERS ) );
- //S32 y = llround( (F32)fmod( position[VY], (F32)REGION_WIDTH_METERS ) );
- //S32 z = llround( (F32)position[VZ] );
+ //S32 x = ll_round( (F32)fmod( position[VX], (F32)REGION_WIDTH_METERS ) );
+ //S32 y = ll_round( (F32)fmod( position[VY], (F32)REGION_WIDTH_METERS ) );
+ //S32 z = ll_round( (F32)position[VZ] );
mPosition = position;
//
mType = LOCATION;
@@ -436,9 +436,9 @@ LLSLURL::LLSLURL(const std::string& grid, const std::string& region, const LLVec
if(!LLGridManager::getInstance()->isInOpenSim())
{
- S32 x = llround( (F32)fmod( position[VX], (F32)REGION_WIDTH_METERS ) );
- S32 y = llround( (F32)fmod( position[VY], (F32)REGION_WIDTH_METERS ) );
- S32 z = llround( (F32)position[VZ] );
+ S32 x = ll_round( (F32)fmod( position[VX], (F32)REGION_WIDTH_METERS ) );
+ S32 y = ll_round( (F32)fmod( position[VY], (F32)REGION_WIDTH_METERS ) );
+ S32 z = ll_round( (F32)position[VZ] );
mPosition = LLVector3(x, y, z);
}
//
@@ -460,9 +460,9 @@ LLSLURL::LLSLURL(const std::string& grid, const std::string& region, const LLVec
// region, LLVector3(global_position.mdV[VX],
// global_position.mdV[VY],
// global_position.mdV[VZ]));
- S32 x = llround( (F32)fmod( (F32)global_position.mdV[VX], (F32)REGION_WIDTH_METERS ) );
- S32 y = llround( (F32)fmod( (F32)global_position.mdV[VY], (F32)REGION_WIDTH_METERS ) );
- S32 z = llround( (F32)global_position.mdV[VZ] );
+ S32 x = ll_round( (F32)fmod( (F32)global_position.mdV[VX], (F32)REGION_WIDTH_METERS ) );
+ S32 y = ll_round( (F32)fmod( (F32)global_position.mdV[VY], (F32)REGION_WIDTH_METERS ) );
+ S32 z = ll_round( (F32)global_position.mdV[VZ] );
*this = LLSLURL(grid, region, LLVector3(x, y, z));
//
@@ -525,9 +525,9 @@ std::string LLSLURL::getSLURLString() const
case LOCATION:
{
// lookup the grid
- S32 x = llround( (F32)mPosition[VX] );
- S32 y = llround( (F32)mPosition[VY] );
- S32 z = llround( (F32)mPosition[VZ] );
+ S32 x = ll_round( (F32)mPosition[VX] );
+ S32 y = ll_round( (F32)mPosition[VY] );
+ S32 z = ll_round( (F32)mPosition[VZ] );
std::string ret = LLGridManager::getInstance()->getSLURLBase(mGrid);
// ret.append(LLURI::escape(mRegion));
// ret.append(llformat("/%d/%d/%d",x,y,z));
@@ -572,9 +572,9 @@ std::string LLSLURL::getLoginString() const
case LOCATION:
unescaped_start << "uri:"
<< mRegion << "&"
- << llround(mPosition[0]) << "&"
- << llround(mPosition[1]) << "&"
- << llround(mPosition[2]);
+ << ll_round(mPosition[0]) << "&"
+ << ll_round(mPosition[1]) << "&"
+ << ll_round(mPosition[2]);
break;
case HOME_LOCATION:
unescaped_start << "home";
@@ -618,9 +618,9 @@ std::string LLSLURL::getLocationString() const
{
return llformat("%s/%d/%d/%d",
mRegion.c_str(),
- (int)llround(mPosition[0]),
- (int)llround(mPosition[1]),
- (int)llround(mPosition[2]));
+ (S32)ll_round(mPosition[0]),
+ (S32)ll_round(mPosition[1]),
+ (S32)ll_round(mPosition[2]));
}
std::string LLSLURL::asString() const
{
diff --git a/indra/newview/lggbeamcolormapfloater.cpp b/indra/newview/lggbeamcolormapfloater.cpp
index 7c30c2b30b..265d5e0bea 100644
--- a/indra/newview/lggbeamcolormapfloater.cpp
+++ b/indra/newview/lggbeamcolormapfloater.cpp
@@ -30,7 +30,7 @@ F32 convertXToHue(S32 place)
S32 convertHueToX(F32 place)
{
- return llround((place / 720.0f) * 396.0f) + 6;
+ return ll_round((place / 720.0f) * 396.0f) + 6;
}
diff --git a/indra/newview/lggbeammaps.cpp b/indra/newview/lggbeammaps.cpp
index 14e7949be4..5701a643c2 100644
--- a/indra/newview/lggbeammaps.cpp
+++ b/indra/newview/lggbeammaps.cpp
@@ -127,7 +127,7 @@ LLColor4U lggBeamMaps::beamColorFromData(const lggBeamsColors& data)
LLColor4U toReturn;
F32 timeinc = timer.getElapsedTimeF32() * 0.3f * ((data.mRotateSpeed + .01f)) * (360 / (data.mEndHue - data.mStartHue));
- S32 diference = llround(data.mEndHue - data.mStartHue);
+ S32 diference = ll_round(data.mEndHue - data.mStartHue);
if (diference == 360 || diference == 720)
{
//full rainbow
diff --git a/indra/newview/llfloaterfacebook.cpp b/indra/newview/llfloaterfacebook.cpp
index f009480201..8298ba570e 100644
--- a/indra/newview/llfloaterfacebook.cpp
+++ b/indra/newview/llfloaterfacebook.cpp
@@ -776,11 +776,11 @@ BOOL LLFacebookPhotoPanel::checkImageSize(LLSnapshotLivePreview* previewp, S32&
//change another value proportionally
if(isWidthChanged)
{
- height = llround(width / aspect_ratio) ;
+ height = ll_round(width / aspect_ratio) ;
}
else
{
- width = llround(height * aspect_ratio) ;
+ width = ll_round(height * aspect_ratio) ;
}
//bound w/h by the max_value
diff --git a/indra/newview/llfloaterflickr.cpp b/indra/newview/llfloaterflickr.cpp
index ae3d2c28ab..4f80013f4b 100644
--- a/indra/newview/llfloaterflickr.cpp
+++ b/indra/newview/llfloaterflickr.cpp
@@ -685,11 +685,11 @@ BOOL LLFlickrPhotoPanel::checkImageSize(LLSnapshotLivePreview* previewp, S32& wi
//change another value proportionally
if(isWidthChanged)
{
- height = llround(width / aspect_ratio) ;
+ height = ll_round(width / aspect_ratio) ;
}
else
{
- width = llround(height * aspect_ratio) ;
+ width = ll_round(height * aspect_ratio) ;
}
//bound w/h by the max_value
diff --git a/indra/newview/llfloatertwitter.cpp b/indra/newview/llfloatertwitter.cpp
index fee70eb771..725b92ae17 100644
--- a/indra/newview/llfloatertwitter.cpp
+++ b/indra/newview/llfloatertwitter.cpp
@@ -610,11 +610,11 @@ BOOL LLTwitterPhotoPanel::checkImageSize(LLSnapshotLivePreview* previewp, S32& w
//change another value proportionally
if(isWidthChanged)
{
- height = llround(width / aspect_ratio) ;
+ height = ll_round(width / aspect_ratio) ;
}
else
{
- width = llround(height * aspect_ratio) ;
+ width = ll_round(height * aspect_ratio) ;
}
//bound w/h by the max_value
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index aec4f533b8..a20dc47237 100644
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -686,9 +686,9 @@ void LLFloaterWorldMap::processParcelInfo(const LLParcelData& parcel_data, const
F32 region_y = pos_global.mdV[VY] - locY;
std::string full_name = llformat("%s (%d, %d, %d)",
sim_name.c_str(),
- llround(region_x),
- llround(region_y),
- llround((F32)pos_global.mdV[VZ]));
+ ll_round(region_x),
+ ll_round(region_y),
+ ll_round((F32)pos_global.mdV[VZ]));
LLTracker::trackLocation(pos_global, parcel_data.name, full_name);
}
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index 65b2e4df16..5c59ab612b 100755
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -1265,8 +1265,8 @@ void LLNetMap::renderPropertyLinesForRegion(const LLViewerRegion* pRegion, const
const S32 imgHeight = (S32)mParcelImagep->getHeight();
const LLVector3 originLocal(pRegion->getOriginGlobal() - mParcelImageCenterGlobal);
- const S32 originX = llround(originLocal.mV[VX] * mObjectMapTPM + imgWidth / 2);
- const S32 originY = llround(originLocal.mV[VY] * mObjectMapTPM + imgHeight / 2);
+ const S32 originX = ll_round(originLocal.mV[VX] * mObjectMapTPM + imgWidth / 2);
+ const S32 originY = ll_round(originLocal.mV[VY] * mObjectMapTPM + imgHeight / 2);
U32* pTextureData = (U32*)mParcelRawImagep->getData();
@@ -1274,14 +1274,14 @@ void LLNetMap::renderPropertyLinesForRegion(const LLViewerRegion* pRegion, const
// Draw the north and east region borders
//
const F32 real_width(pRegion->getWidth());
- const S32 borderY = originY + llround(real_width * mObjectMapTPM);
+ const S32 borderY = originY + ll_round(real_width * mObjectMapTPM);
if ( (borderY >= 0) && (borderY < imgHeight) )
{
S32 curX = llclamp(originX, 0, imgWidth), endX = llclamp(originX + ll_round(real_width * mObjectMapTPM), 0, imgWidth - 1);
for (; curX <= endX; curX++)
pTextureData[borderY * imgWidth + curX] = clrOverlay.asRGBA();
}
- const S32 borderX = originX + llround(real_width * mObjectMapTPM);
+ const S32 borderX = originX + ll_round(real_width * mObjectMapTPM);
if ( (borderX >= 0) && (borderX < imgWidth) )
{
S32 curY = llclamp(originY, 0, imgHeight), endY = llclamp(originY + ll_round(real_width * mObjectMapTPM), 0, imgHeight - 1);
@@ -1309,8 +1309,8 @@ void LLNetMap::renderPropertyLinesForRegion(const LLViewerRegion* pRegion, const
if ( (!fForSale) && (!fCollision) && (!fAuction) && (0 == (overlay & (PARCEL_SOUTH_LINE | PARCEL_WEST_LINE))) )
continue;
- const S32 posX = originX + llround(idxCol * GRID_STEP * mObjectMapTPM);
- const S32 posY = originY + llround(idxRow * GRID_STEP * mObjectMapTPM);
+ const S32 posX = originX + ll_round(idxCol * GRID_STEP * mObjectMapTPM);
+ const S32 posY = originY + ll_round(idxRow * GRID_STEP * mObjectMapTPM);
static LLCachedControl s_fForSaleParcels(gSavedSettings, "MiniMapForSaleParcels");
static LLCachedControl s_fShowCollisionParcels(gSavedSettings, "MiniMapCollisionParcels");
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 04c96836f2..0d80421403 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -6117,7 +6117,7 @@ void LLPickInfo::getSurfaceInfo()
if (objectp)
{
-// if (gViewerWindow->cursorIntersect(llround((F32)mMousePt.mX), ll_round((F32)mMousePt.mY), 1024.f,
+// if (gViewerWindow->cursorIntersect(ll_round((F32)mMousePt.mX), ll_round((F32)mMousePt.mY), 1024.f,
// objectp, -1, mPickTransparent,
// &mObjectFace,
// &mIntersection,
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index 3887e77ed3..1a0cefca5b 100755
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -463,13 +463,13 @@ void LLWorldMapView::draw()
// Inform the fetch mechanism of the size we need
// Aurora Sim
//S32 draw_size = ll_round(sMapScale);
- //overlayimage->setKnownDrawSize(llround(draw_size * LLUI::getScaleFactor().mV[VX]), llround(draw_size * LLUI::getScaleFactor().mV[VY]));
+ //overlayimage->setKnownDrawSize(ll_round(draw_size * LLUI::getScaleFactor().mV[VX]), ll_round(draw_size * LLUI::getScaleFactor().mV[VY]));
S32 x_draw_size = ll_round(sMapScale);
S32 y_draw_size = ll_round(sMapScale);
x_draw_size *= (info->mSizeX / REGION_WIDTH_METERS);
y_draw_size *= (info->mSizeY / REGION_WIDTH_METERS);
- overlayimage->setKnownDrawSize(llround(x_draw_size * LLUI::getScaleFactor().mV[VX]), llround(y_draw_size * LLUI::getScaleFactor().mV[VY]));
+ overlayimage->setKnownDrawSize(ll_round(x_draw_size * LLUI::getScaleFactor().mV[VX]), ll_round(y_draw_size * LLUI::getScaleFactor().mV[VY]));
// Aurora Sim
// Draw something whenever we have enough info
if (overlayimage->hasGLTexture())
diff --git a/indra/newview/quickprefs.cpp b/indra/newview/quickprefs.cpp
index 11b29d7b2a..8f3750e5c0 100644
--- a/indra/newview/quickprefs.cpp
+++ b/indra/newview/quickprefs.cpp
@@ -1080,11 +1080,11 @@ void FloaterQuickPrefs::updateControl(const std::string& controlName, ControlEnt
// if it's an integer entry, round the numbers
if (entry.integer)
{
- entry.min_value = llround(entry.min_value);
- entry.max_value = llround(entry.max_value);
+ entry.min_value = ll_round(entry.min_value);
+ entry.max_value = ll_round(entry.max_value);
// recalculate increment
- entry.increment = llround(entry.increment);
+ entry.increment = ll_round(entry.increment);
if (entry.increment == 0.f)
{
entry.increment = 1.f;