diff options
author | callum_linden <none@none> | 2014-12-10 08:44:08 -0800 |
---|---|---|
committer | callum_linden <none@none> | 2014-12-10 08:44:08 -0800 |
commit | 23711c927561ee85b6d46e7e741cdc652649686e (patch) | |
tree | 4b8c89671594efb2241f894011f9548ae901df76 /indra/llui | |
parent | 6ad2b5f8d3e4c240a48452578d5c3101a2811053 (diff) |
Rename llround(..) to ll_round(..) because of a collision with MS llround (long long round) in VS2013
Diffstat (limited to 'indra/llui')
-rwxr-xr-x | indra/llui/llaccordionctrl.cpp | 2 | ||||
-rwxr-xr-x | indra/llui/llbadge.cpp | 8 | ||||
-rwxr-xr-x | indra/llui/llbutton.cpp | 8 | ||||
-rwxr-xr-x | indra/llui/llfloater.cpp | 30 | ||||
-rwxr-xr-x | indra/llui/llfocusmgr.h | 2 | ||||
-rwxr-xr-x | indra/llui/llfolderview.cpp | 8 | ||||
-rw-r--r-- | indra/llui/llfolderviewitem.cpp | 16 | ||||
-rwxr-xr-x | indra/llui/lllayoutstack.cpp | 22 | ||||
-rwxr-xr-x | indra/llui/lllineeditor.cpp | 20 | ||||
-rwxr-xr-x | indra/llui/llmenugl.cpp | 6 | ||||
-rwxr-xr-x | indra/llui/llmodaldialog.cpp | 2 | ||||
-rwxr-xr-x | indra/llui/llprogressbar.cpp | 2 | ||||
-rwxr-xr-x | indra/llui/llscrollcontainer.cpp | 2 | ||||
-rwxr-xr-x | indra/llui/llscrolllistctrl.cpp | 4 | ||||
-rwxr-xr-x | indra/llui/llspinctrl.cpp | 2 | ||||
-rwxr-xr-x | indra/llui/llstatbar.cpp | 2 | ||||
-rwxr-xr-x | indra/llui/llstatgraph.cpp | 2 | ||||
-rwxr-xr-x | indra/llui/lltextbase.cpp | 6 | ||||
-rwxr-xr-x | indra/llui/lltexteditor.cpp | 2 | ||||
-rwxr-xr-x | indra/llui/lltimectrl.cpp | 2 | ||||
-rwxr-xr-x | indra/llui/llui.cpp | 16 | ||||
-rwxr-xr-x | indra/llui/llurlentry.cpp | 6 |
22 files changed, 85 insertions, 85 deletions
diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp index 3067d9d1ba..623f570cef 100755 --- a/indra/llui/llaccordionctrl.cpp +++ b/indra/llui/llaccordionctrl.cpp @@ -605,7 +605,7 @@ BOOL LLAccordionCtrl::autoScroll (S32 x, S32 y) // autoscroll region should take up no more than one third of visible scroller area S32 auto_scroll_region_height = llmin(rect_local.getHeight() / 3, 10); - S32 auto_scroll_speed = llround(mAutoScrollRate * LLFrameTimer::getFrameDeltaTimeF32()); + S32 auto_scroll_speed = ll_round(mAutoScrollRate * LLFrameTimer::getFrameDeltaTimeF32()); LLRect bottom_scroll_rect = screen_local_extents; bottom_scroll_rect.mTop = rect_local.mBottom + auto_scroll_region_height; diff --git a/indra/llui/llbadge.cpp b/indra/llui/llbadge.cpp index 30cb18812b..42726de0ad 100755 --- a/indra/llui/llbadge.cpp +++ b/indra/llui/llbadge.cpp @@ -196,10 +196,10 @@ void renderBadgeBackground(F32 centerX, F32 centerY, F32 width, F32 height, cons F32 x = LLFontGL::sCurOrigin.mX + centerX - width * 0.5f; F32 y = LLFontGL::sCurOrigin.mY + centerY - height * 0.5f; - LLRectf screen_rect(llround(x), - llround(y), - llround(x) + width, - llround(y) + height); + LLRectf screen_rect(ll_round(x), + ll_round(y), + ll_round(x) + width, + ll_round(y) + height); LLVector3 vertices[4]; vertices[0] = LLVector3(screen_rect.mRight, screen_rect.mTop, 1.0f); diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index ce8383857c..8c7df45884 100755 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -606,8 +606,8 @@ void LLButton::getOverlayImageSize(S32& overlay_width, S32& overlay_height) overlay_height = mImageOverlay->getHeight(); F32 scale_factor = llmin((F32)getRect().getWidth() / (F32)overlay_width, (F32)getRect().getHeight() / (F32)overlay_height, 1.f); - overlay_width = llround((F32)overlay_width * scale_factor); - overlay_height = llround((F32)overlay_height * scale_factor); + overlay_width = ll_round((F32)overlay_width * scale_factor); + overlay_height = ll_round((F32)overlay_height * scale_factor); } @@ -776,7 +776,7 @@ void LLButton::draw() if (hasFocus()) { F32 lerp_amt = gFocusMgr.getFocusFlashAmt(); - drawBorder(imagep, gFocusMgr.getFocusColor() % alpha, llround(lerp(1.f, 3.f, lerp_amt))); + drawBorder(imagep, gFocusMgr.getFocusColor() % alpha, ll_round(lerp(1.f, 3.f, lerp_amt))); } if (use_glow_effect) @@ -1067,7 +1067,7 @@ void LLButton::resize(LLUIString label) { S32 overlay_width = mImageOverlay->getWidth(); F32 scale_factor = (getRect().getHeight() - (mImageOverlayBottomPad + mImageOverlayTopPad)) / (F32)mImageOverlay->getHeight(); - overlay_width = llround((F32)overlay_width * scale_factor); + overlay_width = ll_round((F32)overlay_width * scale_factor); switch(mImageOverlayAlignment) { diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 3dbc9a5902..14f75a2352 100755 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -1954,7 +1954,7 @@ void LLFloater::drawShadow(LLPanel* panel) } gl_drop_shadow(left, top, right, bottom, shadow_color % getCurrentTransparency(), - llround(shadow_offset)); + ll_round(shadow_offset)); } void LLFloater::updateTransparency(LLView* view, ETypeTransparency transparency_type) @@ -2082,16 +2082,16 @@ void LLFloater::updateTitleButtons() btn_rect.setLeftTopAndSize( LLPANEL_BORDER_WIDTH, getRect().getHeight() - close_box_from_top - (floater_close_box_size + 1) * button_count, - llround((F32)floater_close_box_size * mButtonScale), - llround((F32)floater_close_box_size * mButtonScale)); + ll_round((F32)floater_close_box_size * mButtonScale), + ll_round((F32)floater_close_box_size * mButtonScale)); } else { btn_rect.setLeftTopAndSize( getRect().getWidth() - LLPANEL_BORDER_WIDTH - (floater_close_box_size + 1) * button_count, getRect().getHeight() - close_box_from_top, - llround((F32)floater_close_box_size * mButtonScale), - llround((F32)floater_close_box_size * mButtonScale)); + ll_round((F32)floater_close_box_size * mButtonScale), + ll_round((F32)floater_close_box_size * mButtonScale)); } // first time here, init 'buttons_rect' @@ -2142,16 +2142,16 @@ void LLFloater::buildButtons(const Params& floater_params) btn_rect.setLeftTopAndSize( LLPANEL_BORDER_WIDTH, getRect().getHeight() - close_box_from_top - (floater_close_box_size + 1) * (i + 1), - llround(floater_close_box_size * mButtonScale), - llround(floater_close_box_size * mButtonScale)); + ll_round(floater_close_box_size * mButtonScale), + ll_round(floater_close_box_size * mButtonScale)); } else { btn_rect.setLeftTopAndSize( getRect().getWidth() - LLPANEL_BORDER_WIDTH - (floater_close_box_size + 1) * (i + 1), getRect().getHeight() - close_box_from_top, - llround(floater_close_box_size * mButtonScale), - llround(floater_close_box_size * mButtonScale)); + ll_round(floater_close_box_size * mButtonScale), + ll_round(floater_close_box_size * mButtonScale)); } LLButton::Params p; @@ -3466,28 +3466,28 @@ LLCoordCommon LL_COORD_FLOATER::convertToCommon() const LLCoordCommon out; if (self.mX < -0.5f) { - out.mX = llround(rescale(self.mX, -1.f, -0.5f, snap_rect.mLeft - (floater_width - FLOATER_MIN_VISIBLE_PIXELS), snap_rect.mLeft)); + out.mX = ll_round(rescale(self.mX, -1.f, -0.5f, snap_rect.mLeft - (floater_width - FLOATER_MIN_VISIBLE_PIXELS), snap_rect.mLeft)); } else if (self.mX > 0.5f) { - out.mX = llround(rescale(self.mX, 0.5f, 1.f, snap_rect.mRight - floater_width, snap_rect.mRight - FLOATER_MIN_VISIBLE_PIXELS)); + out.mX = ll_round(rescale(self.mX, 0.5f, 1.f, snap_rect.mRight - floater_width, snap_rect.mRight - FLOATER_MIN_VISIBLE_PIXELS)); } else { - out.mX = llround(rescale(self.mX, -0.5f, 0.5f, snap_rect.mLeft, snap_rect.mRight - floater_width)); + out.mX = ll_round(rescale(self.mX, -0.5f, 0.5f, snap_rect.mLeft, snap_rect.mRight - floater_width)); } if (self.mY < -0.5f) { - out.mY = llround(rescale(self.mY, -1.f, -0.5f, snap_rect.mBottom - (floater_height - FLOATER_MIN_VISIBLE_PIXELS), snap_rect.mBottom)); + out.mY = ll_round(rescale(self.mY, -1.f, -0.5f, snap_rect.mBottom - (floater_height - FLOATER_MIN_VISIBLE_PIXELS), snap_rect.mBottom)); } else if (self.mY > 0.5f) { - out.mY = llround(rescale(self.mY, 0.5f, 1.f, snap_rect.mTop - floater_height, snap_rect.mTop - FLOATER_MIN_VISIBLE_PIXELS)); + out.mY = ll_round(rescale(self.mY, 0.5f, 1.f, snap_rect.mTop - floater_height, snap_rect.mTop - FLOATER_MIN_VISIBLE_PIXELS)); } else { - out.mY = llround(rescale(self.mY, -0.5f, 0.5f, snap_rect.mBottom, snap_rect.mTop - floater_height)); + out.mY = ll_round(rescale(self.mY, -0.5f, 0.5f, snap_rect.mBottom, snap_rect.mTop - floater_height)); } // return center point instead of lower left diff --git a/indra/llui/llfocusmgr.h b/indra/llui/llfocusmgr.h index 1c7326260c..afd2a8ce06 100755 --- a/indra/llui/llfocusmgr.h +++ b/indra/llui/llfocusmgr.h @@ -92,7 +92,7 @@ public: void setKeystrokesOnly(BOOL keystrokes_only) { mKeystrokesOnly = keystrokes_only; } F32 getFocusFlashAmt() const; - S32 getFocusFlashWidth() const { return llround(lerp(1.f, 3.f, getFocusFlashAmt())); } + S32 getFocusFlashWidth() const { return ll_round(lerp(1.f, 3.f, getFocusFlashAmt())); } LLColor4 getFocusColor() const; void triggerFocusFlash(); BOOL getAppHasFocus() const { return mAppHasFocus; } diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index e20d6734f1..9f06ccc827 100755 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -306,18 +306,18 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height ) LLFolderViewFolder::arrange(&mMinWidth, &target_height); LLRect scroll_rect = (mScrollContainer ? mScrollContainer->getContentWindowRect() : LLRect()); - reshape( llmax(scroll_rect.getWidth(), mMinWidth), llround(mCurHeight) ); + reshape( llmax(scroll_rect.getWidth(), mMinWidth), ll_round(mCurHeight) ); LLRect new_scroll_rect = (mScrollContainer ? mScrollContainer->getContentWindowRect() : LLRect()); if (new_scroll_rect.getWidth() != scroll_rect.getWidth()) { - reshape( llmax(scroll_rect.getWidth(), mMinWidth), llround(mCurHeight) ); + reshape( llmax(scroll_rect.getWidth(), mMinWidth), ll_round(mCurHeight) ); } // move item renamer text field to item's new position updateRenamerPosition(); - return llround(mTargetHeight); + return ll_round(mTargetHeight); } static LLTrace::BlockTimerStatHandle FTM_FILTER("Filter Folder View"); @@ -340,7 +340,7 @@ void LLFolderView::reshape(S32 width, S32 height, BOOL called_from_parent) scroll_rect = mScrollContainer->getContentWindowRect(); } width = llmax(mMinWidth, scroll_rect.getWidth()); - height = llmax(llround(mCurHeight), scroll_rect.getHeight()); + height = llmax(ll_round(mCurHeight), scroll_rect.getHeight()); // Restrict width within scroll container's width if (mUseEllipses && mScrollContainer) diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 7c88f8fb9b..ffbc02fd08 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -862,7 +862,7 @@ void LLFolderViewItem::draw() if (filter_string_length > 0) { - S32 left = llround(text_left) + font->getWidth(combined_string, 0, mViewModelItem->getFilterStringOffset()) - 2; + S32 left = ll_round(text_left) + font->getWidth(combined_string, 0, mViewModelItem->getFilterStringOffset()) - 2; S32 right = left + font->getWidth(combined_string, mViewModelItem->getFilterStringOffset(), filter_string_length) + 2; S32 bottom = llfloor(getRect().getHeight() - font->getLineHeight() - 3 - TOP_PAD); S32 top = getRect().getHeight() - TOP_PAD; @@ -1046,7 +1046,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height ) { S32 child_width = *width; S32 child_height = 0; - S32 child_top = parent_item_height - llround(running_height); + S32 child_top = parent_item_height - ll_round(running_height); target_height += folderp->arrange( &child_width, &child_height ); @@ -1065,7 +1065,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height ) { S32 child_width = *width; S32 child_height = 0; - S32 child_top = parent_item_height - llround(running_height); + S32 child_top = parent_item_height - ll_round(running_height); target_height += itemp->arrange( &child_width, &child_height ); // don't change width, as this item is as wide as its parent folder by construction @@ -1102,7 +1102,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height ) folders_t::iterator fit = iter++; // number of pixels that bottom of folder label is from top of parent folder if (getRect().getHeight() - (*fit)->getRect().mTop + (*fit)->getItemHeight() - > llround(mCurHeight) + mMaxFolderItemOverlap) + > ll_round(mCurHeight) + mMaxFolderItemOverlap) { // hide if beyond current folder height (*fit)->setVisible(FALSE); @@ -1115,7 +1115,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height ) items_t::iterator iit = iter++; // number of pixels that bottom of item label is from top of parent folder if (getRect().getHeight() - (*iit)->getRect().mBottom - > llround(mCurHeight) + mMaxFolderItemOverlap) + > ll_round(mCurHeight) + mMaxFolderItemOverlap) { (*iit)->setVisible(FALSE); } @@ -1127,12 +1127,12 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height ) } // don't change width as this item is already as wide as its parent folder - reshape(getRect().getWidth(),llround(mCurHeight)); + reshape(getRect().getWidth(),ll_round(mCurHeight)); // pass current height value back to parent - *height = llround(mCurHeight); + *height = ll_round(mCurHeight); - return llround(mTargetHeight); + return ll_round(mTargetHeight); } BOOL LLFolderViewFolder::needsArrange() diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index c59286fc60..69246a2f57 100755 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -103,7 +103,7 @@ F32 LLLayoutPanel::getVisibleAmount() const S32 LLLayoutPanel::getLayoutDim() const { - return llround((F32)((mOrientation == LLLayoutStack::HORIZONTAL) + return ll_round((F32)((mOrientation == LLLayoutStack::HORIZONTAL) ? getRect().getWidth() : getRect().getHeight())); } @@ -130,7 +130,7 @@ void LLLayoutPanel::setTargetDim(S32 value) S32 LLLayoutPanel::getVisibleDim() const { F32 min_dim = getRelevantMinDim(); - return llround(mVisibleAmt + return ll_round(mVisibleAmt * (min_dim + (((F32)mTargetDim - min_dim) * (1.f - mCollapseAmt)))); } @@ -138,7 +138,7 @@ S32 LLLayoutPanel::getVisibleDim() const void LLLayoutPanel::setOrientation( LLView::EOrientation orientation ) { mOrientation = orientation; - S32 layout_dim = llround((F32)((mOrientation == LLLayoutStack::HORIZONTAL) + S32 layout_dim = ll_round((F32)((mOrientation == LLLayoutStack::HORIZONTAL) ? getRect().getWidth() : getRect().getHeight())); @@ -381,14 +381,14 @@ void LLLayoutStack::updateLayout() { panelp->mTargetDim = panelp->getRelevantMinDim(); } - space_to_distribute -= panelp->getVisibleDim() + llround((F32)mPanelSpacing * panelp->getVisibleAmount()); + space_to_distribute -= panelp->getVisibleDim() + ll_round((F32)mPanelSpacing * panelp->getVisibleAmount()); total_visible_fraction += panelp->mFractionalSize * panelp->getAutoResizeFactor(); } llassert(total_visible_fraction < 1.05f); // don't need spacing after last panel - space_to_distribute += panelp ? llround((F32)mPanelSpacing * panelp->getVisibleAmount()) : 0; + space_to_distribute += panelp ? ll_round((F32)mPanelSpacing * panelp->getVisibleAmount()) : 0; S32 remaining_space = space_to_distribute; F32 fraction_distributed = 0.f; @@ -399,7 +399,7 @@ void LLLayoutStack::updateLayout() if (panelp->mAutoResize) { F32 fraction_to_distribute = (panelp->mFractionalSize * panelp->getAutoResizeFactor()) / (total_visible_fraction); - S32 delta = llround((F32)space_to_distribute * fraction_to_distribute); + S32 delta = ll_round((F32)space_to_distribute * fraction_to_distribute); fraction_distributed += fraction_to_distribute; panelp->mTargetDim += delta; remaining_space -= delta; @@ -431,23 +431,23 @@ void LLLayoutStack::updateLayout() LLRect panel_rect; if (mOrientation == HORIZONTAL) { - panel_rect.setLeftTopAndSize(llround(cur_pos), + panel_rect.setLeftTopAndSize(ll_round(cur_pos), getRect().getHeight(), - llround(panel_dim), + ll_round(panel_dim), getRect().getHeight()); } else { panel_rect.setLeftTopAndSize(0, - llround(cur_pos), + ll_round(cur_pos), getRect().getWidth(), - llround(panel_dim)); + ll_round(panel_dim)); } LLRect resize_bar_rect(panel_rect); F32 panel_spacing = (F32)mPanelSpacing * panelp->getVisibleAmount(); F32 panel_visible_dim = panelp->getVisibleDim(); - S32 panel_spacing_round = (S32)(llround(panel_spacing)); + S32 panel_spacing_round = (S32)(ll_round(panel_spacing)); if (mOrientation == HORIZONTAL) { diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 45f4272aa7..ae94a021d1 100755 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -829,7 +829,7 @@ BOOL LLLineEditor::handleHover(S32 x, S32 y, MASK mask) // Scroll if mouse cursor outside of bounds if (mScrollTimer.hasExpired()) { - S32 increment = llround(mScrollTimer.getElapsedTimeF32() / AUTO_SCROLL_TIME); + S32 increment = ll_round(mScrollTimer.getElapsedTimeF32() / AUTO_SCROLL_TIME); mScrollTimer.reset(); mScrollTimer.setTimerExpirySec(AUTO_SCROLL_TIME); if( (x < mTextLeftEdge) && (mScrollHPos > 0 ) ) @@ -1833,7 +1833,7 @@ void LLLineEditor::draw() 0, LLFontGL::NO_SHADOW, select_left - mScrollHPos, - mTextRightEdge - llround(rendered_pixels_right), + mTextRightEdge - ll_round(rendered_pixels_right), &rendered_pixels_right); } @@ -1843,8 +1843,8 @@ void LLLineEditor::draw() color.setAlpha(alpha); // selected middle S32 width = mGLFont->getWidth(mText.getWString().c_str(), mScrollHPos + rendered_text, select_right - mScrollHPos - rendered_text); - width = llmin(width, mTextRightEdge - llround(rendered_pixels_right)); - gl_rect_2d(llround(rendered_pixels_right), cursor_top, llround(rendered_pixels_right)+width, cursor_bottom, color); + width = llmin(width, mTextRightEdge - ll_round(rendered_pixels_right)); + gl_rect_2d(ll_round(rendered_pixels_right), cursor_top, ll_round(rendered_pixels_right)+width, cursor_bottom, color); LLColor4 tmp_color( 1.f - text_color.mV[0], 1.f - text_color.mV[1], 1.f - text_color.mV[2], alpha ); rendered_text += mGLFont->render( @@ -1855,7 +1855,7 @@ void LLLineEditor::draw() 0, LLFontGL::NO_SHADOW, select_right - mScrollHPos - rendered_text, - mTextRightEdge - llround(rendered_pixels_right), + mTextRightEdge - ll_round(rendered_pixels_right), &rendered_pixels_right); } @@ -1870,7 +1870,7 @@ void LLLineEditor::draw() 0, LLFontGL::NO_SHADOW, S32_MAX, - mTextRightEdge - llround(rendered_pixels_right), + mTextRightEdge - ll_round(rendered_pixels_right), &rendered_pixels_right); } } @@ -1884,7 +1884,7 @@ void LLLineEditor::draw() 0, LLFontGL::NO_SHADOW, S32_MAX, - mTextRightEdge - llround(rendered_pixels_right), + mTextRightEdge - ll_round(rendered_pixels_right), &rendered_pixels_right); } #if 1 // for when we're ready for image art. @@ -2044,7 +2044,7 @@ void LLLineEditor::draw() 0, LLFontGL::NO_SHADOW, S32_MAX, - mTextRightEdge - llround(rendered_pixels_right), + mTextRightEdge - ll_round(rendered_pixels_right), &rendered_pixels_right, FALSE); } @@ -2069,7 +2069,7 @@ void LLLineEditor::draw() 0, LLFontGL::NO_SHADOW, S32_MAX, - mTextRightEdge - llround(rendered_pixels_right), + mTextRightEdge - ll_round(rendered_pixels_right), &rendered_pixels_right, FALSE); } // Draw children (border) @@ -2573,7 +2573,7 @@ void LLLineEditor::markAsPreedit(S32 position, S32 length) S32 LLLineEditor::getPreeditFontSize() const { - return llround(mGLFont->getLineHeight() * LLUI::getScaleFactor().mV[VY]); + return ll_round(mGLFont->getLineHeight() * LLUI::getScaleFactor().mV[VY]); } void LLLineEditor::setReplaceNewlinesWithSpaces(BOOL replace) diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 8ef2b4ef5b..6b0acb5fb4 100755 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -1573,7 +1573,7 @@ void LLMenuItemBranchDownGL::draw( void ) std::string::size_type offset = upper_case_label.find(getJumpKey()); if (offset != std::string::npos) { - S32 x_offset = llround((F32)getRect().getWidth() / 2.f - getFont()->getWidthF32(mLabel.getString(), 0, S32_MAX) / 2.f); + S32 x_offset = ll_round((F32)getRect().getWidth() / 2.f - getFont()->getWidthF32(mLabel.getString(), 0, S32_MAX) / 2.f); S32 x_begin = x_offset + getFont()->getWidth(mLabel, 0, offset); S32 x_end = x_offset + getFont()->getWidth(mLabel, 0, offset + 1); gl_line_2d(x_begin, LABEL_BOTTOM_PAD_PIXELS, x_end, LABEL_BOTTOM_PAD_PIXELS); @@ -3005,8 +3005,8 @@ BOOL LLMenuGL::handleHover( S32 x, S32 y, MASK mask ) LLVector2 mouse_avg_dir((F32)mMouseVelX, (F32)mMouseVelY); mouse_avg_dir.normVec(); F32 interp = 0.5f * (llclamp(mouse_dir * mouse_avg_dir, 0.f, 1.f)); - mMouseVelX = llround(lerp((F32)mouse_delta_x, (F32)mMouseVelX, interp)); - mMouseVelY = llround(lerp((F32)mouse_delta_y, (F32)mMouseVelY, interp)); + mMouseVelX = ll_round(lerp((F32)mouse_delta_x, (F32)mMouseVelX, interp)); + mMouseVelY = ll_round(lerp((F32)mouse_delta_y, (F32)mMouseVelY, interp)); mLastMouseX = x; mLastMouseY = y; diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp index 33e66add18..8cf88ad5eb 100755 --- a/indra/llui/llmodaldialog.cpp +++ b/indra/llui/llmodaldialog.cpp @@ -287,7 +287,7 @@ void LLModalDialog::draw() void LLModalDialog::centerOnScreen() { LLVector2 window_size = LLUI::getWindowSize(); - centerWithin(LLRect(0, 0, llround(window_size.mV[VX]), llround(window_size.mV[VY]))); + centerWithin(LLRect(0, 0, ll_round(window_size.mV[VX]), ll_round(window_size.mV[VY]))); } diff --git a/indra/llui/llprogressbar.cpp b/indra/llui/llprogressbar.cpp index 84a890edfa..209796565c 100755 --- a/indra/llui/llprogressbar.cpp +++ b/indra/llui/llprogressbar.cpp @@ -77,7 +77,7 @@ void LLProgressBar::draw() LLColor4 bar_color = mColorBar.get(); bar_color.mV[VALPHA] *= alpha; // modulate alpha LLRect progress_rect = getLocalRect(); - progress_rect.mRight = llround(getRect().getWidth() * (mPercentDone / 100.f)); + progress_rect.mRight = ll_round(getRect().getWidth() * (mPercentDone / 100.f)); mImageFill->draw(progress_rect, bar_color); } diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp index 898e13a2c5..f70eebc594 100755 --- a/indra/llui/llscrollcontainer.cpp +++ b/indra/llui/llscrollcontainer.cpp @@ -314,7 +314,7 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y) // clip rect against root view inner_rect_local.intersectWith(screen_local_extents); - S32 auto_scroll_speed = llround(mAutoScrollRate * LLFrameTimer::getFrameDeltaTimeF32()); + S32 auto_scroll_speed = ll_round(mAutoScrollRate * LLFrameTimer::getFrameDeltaTimeF32()); // autoscroll region should take up no more than one third of visible scroller area S32 auto_scroll_region_width = llmin(inner_rect_local.getWidth() / 3, 10); S32 auto_scroll_region_height = llmin(inner_rect_local.getHeight() / 3, 10); diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index cf8be57908..899a0bbab9 100755 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -648,7 +648,7 @@ bool LLScrollListCtrl::updateColumnWidths() S32 new_width = 0; if (column->mRelWidth >= 0) { - new_width = (S32)llround(column->mRelWidth*mItemListRect.getWidth()); + new_width = (S32)ll_round(column->mRelWidth*mItemListRect.getWidth()); } else if (column->mDynamicWidth) { @@ -2679,7 +2679,7 @@ void LLScrollListCtrl::addColumn(const LLScrollListColumn::Params& column_params } if (new_column->mRelWidth >= 0) { - new_column->setWidth((S32)llround(new_column->mRelWidth*mItemListRect.getWidth())); + new_column->setWidth((S32)ll_round(new_column->mRelWidth*mItemListRect.getWidth())); } else if(new_column->mDynamicWidth) { diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp index ebdbdf59c0..8b1ba406c8 100755 --- a/indra/llui/llspinctrl.cpp +++ b/indra/llui/llspinctrl.cpp @@ -153,7 +153,7 @@ F32 clamp_precision(F32 value, S32 decimal_precision) for (S32 i = 0; i < decimal_precision; i++) clamped_value *= 10.0; - clamped_value = llround((F32)clamped_value); + clamped_value = ll_round((F32)clamped_value); for (S32 i = 0; i < decimal_precision; i++) clamped_value /= 10.0; diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp index 1bd2bc06f4..a972b65f4a 100755 --- a/indra/llui/llstatbar.cpp +++ b/indra/llui/llstatbar.cpp @@ -711,7 +711,7 @@ void LLStatBar::drawTicks( F32 min, F32 max, F32 value_scale, LLRect &bar_rect ) if (tick_begin > last_label + MIN_LABEL_SPACING) { gl_rect_2d(tick_begin, bar_rect.mTop, tick_end, bar_rect.mBottom - TICK_LENGTH, LLColor4(1.f, 1.f, 1.f, 0.25f)); - S32 label_pos = tick_begin - llround((F32)tick_label_width * ((F32)tick_begin / (F32)bar_rect.getWidth())); + S32 label_pos = tick_begin - ll_round((F32)tick_label_width * ((F32)tick_begin / (F32)bar_rect.getWidth())); LLFontGL::getFontMonospace()->renderUTF8(tick_label, 0, label_pos, bar_rect.mBottom - TICK_LENGTH, LLColor4(1.f, 1.f, 1.f, 0.5f), LLFontGL::LEFT, LLFontGL::TOP); diff --git a/indra/llui/llstatgraph.cpp b/indra/llui/llstatgraph.cpp index 98962aff9a..3fe314e77a 100755 --- a/indra/llui/llstatgraph.cpp +++ b/indra/llui/llstatgraph.cpp @@ -111,7 +111,7 @@ void LLStatGraph::draw() color = it->mColor; gGL.color4fv(color.mV); - gl_rect_2d(1, llround(frac*getRect().getHeight()), getRect().getWidth() - 1, 0, TRUE); + gl_rect_2d(1, ll_round(frac*getRect().getHeight()), getRect().getWidth() - 1, 0, TRUE); } void LLStatGraph::setMin(const F32 min) diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 9b125a85b9..367bc9a084 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1556,7 +1556,7 @@ void LLTextBase::reflow() line_count)); line_start_index = segment->getStart() + seg_offset; - cur_top -= llround((F32)line_height * mLineSpacingMult) + mLineSpacingPixels; + cur_top -= ll_round((F32)line_height * mLineSpacingMult) + mLineSpacingPixels; remaining_pixels = text_available_width; line_height = 0; } @@ -1568,7 +1568,7 @@ void LLTextBase::reflow() last_segment_char_on_line, line_rect, line_count)); - cur_top -= llround((F32)line_height * mLineSpacingMult) + mLineSpacingPixels; + cur_top -= ll_round((F32)line_height * mLineSpacingMult) + mLineSpacingPixels; break; } // ...or finished a segment and there are segments remaining on this line @@ -1583,7 +1583,7 @@ void LLTextBase::reflow() line_rect, line_count)); line_start_index = segment->getStart() + seg_offset; - cur_top -= llround((F32)line_height * mLineSpacingMult) + mLineSpacingPixels; + cur_top -= ll_round((F32)line_height * mLineSpacingMult) + mLineSpacingPixels; line_height = 0; remaining_pixels = text_available_width; } diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index cf5fdef539..c433f8ccab 100755 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -2840,7 +2840,7 @@ void LLTextEditor::markAsPreedit(S32 position, S32 length) S32 LLTextEditor::getPreeditFontSize() const { - return llround((F32)mFont->getLineHeight() * LLUI::getScaleFactor().mV[VY]); + return ll_round((F32)mFont->getLineHeight() * LLUI::getScaleFactor().mV[VY]); } BOOL LLTextEditor::isDirty() const diff --git a/indra/llui/lltimectrl.cpp b/indra/llui/lltimectrl.cpp index 271947db7a..516057f8fd 100755 --- a/indra/llui/lltimectrl.cpp +++ b/indra/llui/lltimectrl.cpp @@ -153,7 +153,7 @@ U32 LLTimeCtrl::getMinutes() const void LLTimeCtrl::setTime24(F32 time) { time = llclamp(time, 0.0f, 23.99f); // fix out of range values - mTime = llround(time * MINUTES_PER_HOUR); // fixes values like 4.99999 + mTime = ll_round(time * MINUTES_PER_HOUR); // fixes values like 4.99999 updateText(); } diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index 1f570edd88..aabc7ed2e4 100755 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -236,8 +236,8 @@ void LLUI::dirtyRect(LLRect rect) void LLUI::setMousePositionScreen(S32 x, S32 y) { S32 screen_x, screen_y; - screen_x = llround((F32)x * getScaleFactor().mV[VX]); - screen_y = llround((F32)y * getScaleFactor().mV[VY]); + screen_x = ll_round((F32)x * getScaleFactor().mV[VX]); + screen_y = ll_round((F32)y * getScaleFactor().mV[VY]); LLView::getWindow()->setCursorPosition(LLCoordGL(screen_x, screen_y).convert()); } @@ -248,8 +248,8 @@ void LLUI::getMousePositionScreen(S32 *x, S32 *y) LLCoordWindow cursor_pos_window; getWindow()->getCursorPosition(&cursor_pos_window); LLCoordGL cursor_pos_gl(cursor_pos_window.convert()); - *x = llround((F32)cursor_pos_gl.mX / getScaleFactor().mV[VX]); - *y = llround((F32)cursor_pos_gl.mY / getScaleFactor().mV[VX]); + *x = ll_round((F32)cursor_pos_gl.mX / getScaleFactor().mV[VX]); + *y = ll_round((F32)cursor_pos_gl.mY / getScaleFactor().mV[VX]); } //static @@ -369,15 +369,15 @@ LLVector2 LLUI::getWindowSize() //static void LLUI::screenPointToGL(S32 screen_x, S32 screen_y, S32 *gl_x, S32 *gl_y) { - *gl_x = llround((F32)screen_x * getScaleFactor().mV[VX]); - *gl_y = llround((F32)screen_y * getScaleFactor().mV[VY]); + *gl_x = ll_round((F32)screen_x * getScaleFactor().mV[VX]); + *gl_y = ll_round((F32)screen_y * getScaleFactor().mV[VY]); } //static void LLUI::glPointToScreen(S32 gl_x, S32 gl_y, S32 *screen_x, S32 *screen_y) { - *screen_x = llround((F32)gl_x / getScaleFactor().mV[VX]); - *screen_y = llround((F32)gl_y / getScaleFactor().mV[VY]); + *screen_x = ll_round((F32)gl_x / getScaleFactor().mV[VX]); + *screen_y = ll_round((F32)gl_y / getScaleFactor().mV[VY]); } //static diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 6f3122e7a1..9c470b5cca 100755 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -835,9 +835,9 @@ void LLUrlEntryParcel::processParcelInfo(const LLParcelData& parcel_data) // If parcel name is empty use Sim_name (x, y, z) for parcel label. else if (!parcel_data.sim_name.empty()) { - S32 region_x = llround(parcel_data.global_x) % REGION_WIDTH_UNITS; - S32 region_y = llround(parcel_data.global_y) % REGION_WIDTH_UNITS; - S32 region_z = llround(parcel_data.global_z); + S32 region_x = ll_round(parcel_data.global_x) % REGION_WIDTH_UNITS; + S32 region_y = ll_round(parcel_data.global_y) % REGION_WIDTH_UNITS; + S32 region_z = ll_round(parcel_data.global_z); label = llformat("%s (%d, %d, %d)", parcel_data.sim_name.c_str(), region_x, region_y, region_z); |