Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Testicular Slingshot
Alchemy Viewer
Commits
5e95a3e0
Commit
5e95a3e0
authored
Jan 03, 2020
by
Rye Mutt
🍞
Browse files
Const refs and move various strings and objects
parent
03d449dc
Changes
18
Hide whitespace changes
Inline
Side-by-side
indra/llui/llaccordionctrltab.cpp
View file @
5e95a3e0
...
...
@@ -73,7 +73,7 @@ public:
void
setTitleFontStyle
(
std
::
string
style
);
void
setTitleColor
(
LLUIC
olor
);
void
setTitleColor
(
const
LLUIColor
&
c
olor
);
void
setSelected
(
bool
is_selected
)
{
mIsSelected
=
is_selected
;
}
...
...
@@ -190,7 +190,7 @@ void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::setTitleFontStyle(std::string
}
}
void
LLAccordionCtrlTab
::
LLAccordionCtrlTabHeader
::
setTitleColor
(
LLUIColor
color
)
void
LLAccordionCtrlTab
::
LLAccordionCtrlTabHeader
::
setTitleColor
(
const
LLUIColor
&
color
)
{
if
(
mHeaderTextbox
)
{
...
...
@@ -536,7 +536,7 @@ void LLAccordionCtrlTab::setTitleFontStyle(const std::string& style)
}
}
void
LLAccordionCtrlTab
::
setTitleColor
(
LLUIColor
color
)
void
LLAccordionCtrlTab
::
setTitleColor
(
const
LLUIColor
&
color
)
{
if
(
mHeader
)
{
...
...
indra/llui/llaccordionctrltab.h
View file @
5e95a3e0
...
...
@@ -118,7 +118,7 @@ public:
void
setTitleFontStyle
(
const
std
::
string
&
style
);
// Set text color in LLAccordionCtrlTabHeader
void
setTitleColor
(
LLUIColor
color
);
void
setTitleColor
(
const
LLUIColor
&
color
);
boost
::
signals2
::
connection
setFocusReceivedCallback
(
const
focus_signal_t
::
slot_type
&
cb
);
boost
::
signals2
::
connection
setFocusLostCallback
(
const
focus_signal_t
::
slot_type
&
cb
);
...
...
indra/llui/llbutton.cpp
View file @
5e95a3e0
...
...
@@ -731,13 +731,12 @@ void LLButton::draw()
// else use usual flashing via flash_color
else
if
(
mFlashingTimer
)
{
LLColor4
flash_color
=
mFlashBgColor
.
get
();
use_glow_effect
=
TRUE
;
glow_type
=
LLRender
::
BT_ALPHA
;
// blend the glow
if
(
mFlashingTimer
->
isCurrentlyHighlighted
()
||
!
mFlashingTimer
->
isFlashingInProgress
())
{
glow_color
=
f
lash
_c
olor
;
glow_color
=
mF
lash
BgC
olor
.
get
()
;
}
else
if
(
mNeedsHighlight
)
{
...
...
@@ -1056,7 +1055,7 @@ const LLUIString& LLButton::getCurrentLabel() const
void
LLButton
::
setImageUnselected
(
LLPointer
<
LLUIImage
>
image
)
{
mImageUnselected
=
image
;
mImageUnselected
=
std
::
move
(
image
)
;
if
(
mImageUnselected
.
isNull
())
{
LL_WARNS
()
<<
"Setting default button image for: "
<<
getName
()
<<
" to NULL"
<<
LL_ENDL
;
...
...
@@ -1112,7 +1111,7 @@ void LLButton::setImages( const std::string &image_name, const std::string &sele
void
LLButton
::
setImageSelected
(
LLPointer
<
LLUIImage
>
image
)
{
mImageSelected
=
image
;
mImageSelected
=
std
::
move
(
image
)
;
}
void
LLButton
::
setImageColor
(
const
LLColor4
&
c
)
...
...
@@ -1127,36 +1126,36 @@ void LLButton::setColor(const LLColor4& color)
void
LLButton
::
setImageDisabled
(
LLPointer
<
LLUIImage
>
image
)
{
mImageDisabled
=
image
;
mImageDisabled
=
std
::
move
(
image
)
;
mDisabledImageColor
=
mImageColor
;
mFadeWhenDisabled
=
TRUE
;
}
void
LLButton
::
setImageDisabledSelected
(
LLPointer
<
LLUIImage
>
image
)
{
mImageDisabledSelected
=
image
;
mImageDisabledSelected
=
std
::
move
(
image
)
;
mDisabledImageColor
=
mImageColor
;
mFadeWhenDisabled
=
TRUE
;
}
void
LLButton
::
setImagePressed
(
LLPointer
<
LLUIImage
>
image
)
{
mImagePressed
=
image
;
mImagePressed
=
std
::
move
(
image
)
;
}
void
LLButton
::
setImageHoverSelected
(
LLPointer
<
LLUIImage
>
image
)
{
mImageHoverSelected
=
image
;
mImageHoverSelected
=
std
::
move
(
image
)
;
}
void
LLButton
::
setImageHoverUnselected
(
LLPointer
<
LLUIImage
>
image
)
{
mImageHoverUnselected
=
image
;
mImageHoverUnselected
=
std
::
move
(
image
)
;
}
void
LLButton
::
setImageFlash
(
LLPointer
<
LLUIImage
>
image
)
{
mImageFlash
=
image
;
mImageFlash
=
std
::
move
(
image
)
;
}
void
LLButton
::
setImageOverlay
(
const
std
::
string
&
image_name
,
LLFontGL
::
HAlign
alignment
,
const
LLColor4
&
color
)
...
...
indra/llui/llcombobox.cpp
View file @
5e95a3e0
...
...
@@ -968,11 +968,8 @@ void LLComboBox::onTextEntry(LLLineEditor* line_editor)
void
LLComboBox
::
updateSelection
()
{
LLWString
left_wstring
=
mTextEntry
->
getWText
().
substr
(
0
,
mTextEntry
->
getCursor
());
// user-entered portion of string, based on assumption that any selected
// text was a result of auto-completion
LLWString
user_wstring
=
mHasAutocompletedText
?
left_wstring
:
mTextEntry
->
getWText
();
std
::
string
full_string
=
mTextEntry
->
getText
();
const
LLWString
left_wstring
=
mTextEntry
->
getWText
().
substr
(
0
,
mTextEntry
->
getCursor
());
const
std
::
string
&
full_string
=
mTextEntry
->
getText
();
// go ahead and arrange drop down list on first typed character, even
// though we aren't showing it... some code relies on prearrange
...
...
@@ -1000,6 +997,10 @@ void LLComboBox::updateSelection()
}
else
// no matching items found
{
// user-entered portion of string, based on assumption that any selected
// text was a result of auto-completion
const
LLWString
user_wstring
=
mHasAutocompletedText
?
left_wstring
:
mTextEntry
->
getWText
();
mList
->
deselectAllItems
();
mTextEntry
->
setText
(
wstring_to_utf8str
(
user_wstring
));
// removes text added by autocompletion
mTextEntry
->
setTentative
(
mTextEntryTentative
);
...
...
indra/llui/llkeywords.cpp
View file @
5e95a3e0
...
...
@@ -221,7 +221,7 @@ LLColor4 LLKeywords::getColorGroup(const std::string& key_in)
void
LLKeywords
::
initialize
(
LLSD
SyntaxXML
)
{
mSyntax
=
SyntaxXML
;
mSyntax
=
std
::
move
(
SyntaxXML
)
;
mLoaded
=
true
;
}
...
...
indra/llui/llscrolllistctrl.cpp
View file @
5e95a3e0
...
...
@@ -1928,7 +1928,7 @@ void LLScrollListCtrl::addFriend(const std::string& id)
LLUrlAction
::
addFriend
(
slurl
);
}
void
LLScrollListCtrl
::
removeFriend
(
std
::
string
id
)
void
LLScrollListCtrl
::
removeFriend
(
const
std
::
string
&
id
)
{
std
::
string
slurl
=
"secondlife:///app/agent/"
+
id
+
"/about"
;
LLUrlAction
::
removeFriend
(
slurl
);
...
...
indra/llui/llscrolllistctrl.h
View file @
5e95a3e0
...
...
@@ -442,7 +442,7 @@ private:
static
void
showProfile
(
const
std
::
string
&
id
,
bool
is_group
);
static
void
sendIM
(
const
std
::
string
&
id
);
static
void
addFriend
(
const
std
::
string
&
id
);
static
void
removeFriend
(
std
::
string
id
);
static
void
removeFriend
(
const
std
::
string
&
id
);
static
void
showNameDetails
(
const
std
::
string
&
id
,
bool
is_group
);
static
void
copyNameToClipboard
(
const
std
::
string
&
id
,
bool
is_group
);
static
void
copySLURLToClipboard
(
const
std
::
string
&
id
,
bool
is_group
);
...
...
indra/newview/llagentwearables.cpp
View file @
5e95a3e0
...
...
@@ -256,7 +256,7 @@ LLAgentWearables::AddWearableToAgentInventoryCallback::AddWearableToAgentInvento
mWearable
(
wearable
),
mTodo
(
todo
),
mCB
(
std
::
move
(
cb
)),
mDescription
(
description
)
mDescription
(
std
::
move
(
description
)
)
{
LL_INFOS
()
<<
"constructor"
<<
LL_ENDL
;
}
...
...
@@ -411,7 +411,7 @@ void LLAgentWearables::sendAgentWearablesUpdate()
}
void
LLAgentWearables
::
saveWearable
(
const
LLWearableType
::
EType
type
,
const
U32
index
,
BOOL
send_update
,
const
std
::
string
new_name
)
const
std
::
string
&
new_name
)
{
LLViewerWearable
*
old_wearable
=
getViewerWearable
(
type
,
index
);
if
(
!
old_wearable
)
return
;
...
...
indra/newview/llagentwearables.h
View file @
5e95a3e0
...
...
@@ -197,7 +197,7 @@ private:
public:
void
saveWearableAs
(
const
LLWearableType
::
EType
type
,
const
U32
index
,
const
std
::
string
&
new_name
,
const
std
::
string
&
description
,
BOOL
save_in_lost_and_found
);
void
saveWearable
(
const
LLWearableType
::
EType
type
,
const
U32
index
,
BOOL
send_update
=
TRUE
,
const
std
::
string
new_name
=
""
);
const
std
::
string
&
new_name
=
""
);
void
saveAllWearables
();
void
revertWearable
(
const
LLWearableType
::
EType
type
,
const
U32
index
);
...
...
indra/newview/llappearancemgr.cpp
View file @
5e95a3e0
...
...
@@ -3041,7 +3041,7 @@ private:
// Dangerous if caller assumes link will exist after calling the function.
void
LLAppearanceMgr
::
addCOFItemLink
(
const
LLUUID
&
item_id
,
LLPointer
<
LLInventoryCallback
>
cb
,
const
std
::
string
description
)
const
std
::
string
&
description
)
{
const
LLInventoryItem
*
item
=
gInventory
.
getItem
(
item_id
);
if
(
!
item
)
...
...
@@ -3057,7 +3057,7 @@ void LLAppearanceMgr::addCOFItemLink(const LLUUID &item_id,
void
LLAppearanceMgr
::
addCOFItemLink
(
const
LLInventoryItem
*
item
,
LLPointer
<
LLInventoryCallback
>
cb
,
const
std
::
string
description
)
const
std
::
string
&
description
)
{
const
LLViewerInventoryItem
*
vitem
=
dynamic_cast
<
const
LLViewerInventoryItem
*>
(
item
);
if
(
!
vitem
)
...
...
indra/newview/llappearancemgr.h
View file @
5e95a3e0
...
...
@@ -158,8 +158,8 @@ public:
void
setAttachmentInvLinkEnable
(
bool
val
);
// Add COF link to individual item.
void
addCOFItemLink
(
const
LLUUID
&
item_id
,
LLPointer
<
LLInventoryCallback
>
cb
=
nullptr
,
const
std
::
string
description
=
""
);
void
addCOFItemLink
(
const
LLInventoryItem
*
item
,
LLPointer
<
LLInventoryCallback
>
cb
=
nullptr
,
const
std
::
string
description
=
""
);
void
addCOFItemLink
(
const
LLUUID
&
item_id
,
LLPointer
<
LLInventoryCallback
>
cb
=
nullptr
,
const
std
::
string
&
description
=
""
);
void
addCOFItemLink
(
const
LLInventoryItem
*
item
,
LLPointer
<
LLInventoryCallback
>
cb
=
nullptr
,
const
std
::
string
&
description
=
""
);
// Find COF entries referencing the given item.
LLInventoryModel
::
item_array_t
findCOFItemLinks
(
const
LLUUID
&
item_id
);
...
...
indra/newview/llautoreplace.cpp
View file @
5e95a3e0
...
...
@@ -300,7 +300,7 @@ bool LLAutoReplaceSettings::setFromLLSD(const LLSD& settingsFromLLSD)
return
settingsValid
;
}
bool
LLAutoReplaceSettings
::
listNameMatches
(
const
LLSD
&
list
,
const
std
::
string
name
)
bool
LLAutoReplaceSettings
::
listNameMatches
(
const
LLSD
&
list
,
const
std
::
string
&
name
)
{
return
list
.
isMap
()
&&
list
.
has
(
AUTOREPLACE_LIST_NAME
)
...
...
@@ -673,7 +673,7 @@ bool LLAutoReplaceSettings::decreaseListPriority(std::string listName)
}
std
::
string
LLAutoReplaceSettings
::
replaceWord
(
const
std
::
string
currentWord
)
std
::
string
LLAutoReplaceSettings
::
replaceWord
(
const
std
::
string
&
currentWord
)
{
std
::
string
returnedWord
=
currentWord
;
// in case no replacement is found
static
LLCachedControl
<
bool
>
autoreplace_enabled
(
gSavedSettings
,
"AutoReplace"
,
false
);
...
...
indra/newview/llautoreplace.h
View file @
5e95a3e0
...
...
@@ -121,7 +121,7 @@ class LLAutoReplaceSettings
* Look for currentWord in the lists in order, returning any substitution found
* If no configured substitution is found, returns currentWord
*/
std
::
string
replaceWord
(
const
std
::
string
currentWord
/**< word to search for */
);
std
::
string
replaceWord
(
const
std
::
string
&
currentWord
/**< word to search for */
);
/// Provides a hard-coded example of settings
LLSD
getExampleLLSD
();
...
...
@@ -132,7 +132,7 @@ class LLAutoReplaceSettings
private:
/// Efficiently and safely compare list names
bool
listNameMatches
(
const
LLSD
&
list
,
const
std
::
string
name
);
bool
listNameMatches
(
const
LLSD
&
list
,
const
std
::
string
&
name
);
/// The actual llsd data structure
LLSD
mLists
;
...
...
indra/newview/llavatarpropertiesprocessor.cpp
View file @
5e95a3e0
...
...
@@ -95,7 +95,7 @@ void LLAvatarPropertiesProcessor::removeObserver(const LLUUID& avatar_id, LLAvat
}
void
LLAvatarPropertiesProcessor
::
sendGenericRequest
(
const
LLUUID
&
avatar_id
,
EAvatarProcessorType
type
,
const
std
::
string
method
)
void
LLAvatarPropertiesProcessor
::
sendGenericRequest
(
const
LLUUID
&
avatar_id
,
EAvatarProcessorType
type
,
const
std
::
string
&
method
)
{
// Suppress duplicate requests while waiting for a response from the network
if
(
isPendingRequest
(
avatar_id
,
type
))
...
...
@@ -492,7 +492,7 @@ void LLAvatarPropertiesProcessor::sendFriendRights(const LLUUID& avatar_id, S32
}
}
void
LLAvatarPropertiesProcessor
::
sendNotes
(
const
LLUUID
&
avatar_id
,
const
std
::
string
notes
)
void
LLAvatarPropertiesProcessor
::
sendNotes
(
const
LLUUID
&
avatar_id
,
const
std
::
string
&
notes
)
{
if
(
!
avatar_id
.
isNull
())
{
...
...
indra/newview/llavatarpropertiesprocessor.h
View file @
5e95a3e0
...
...
@@ -229,7 +229,7 @@ public:
void
sendFriendRights
(
const
LLUUID
&
avatar_id
,
S32
rights
);
void
sendNotes
(
const
LLUUID
&
avatar_id
,
const
std
::
string
notes
);
void
sendNotes
(
const
LLUUID
&
avatar_id
,
const
std
::
string
&
notes
);
void
sendPickDelete
(
const
LLUUID
&
pick_id
);
...
...
@@ -262,7 +262,7 @@ public:
protected:
void
sendGenericRequest
(
const
LLUUID
&
avatar_id
,
EAvatarProcessorType
type
,
const
std
::
string
method
);
void
sendGenericRequest
(
const
LLUUID
&
avatar_id
,
EAvatarProcessorType
type
,
const
std
::
string
&
method
);
void
notifyObservers
(
const
LLUUID
&
id
,
void
*
data
,
EAvatarProcessorType
type
);
...
...
indra/newview/llclassifieditem.h
View file @
5e95a3e0
...
...
@@ -53,7 +53,7 @@ public:
void
setClassifiedId
(
const
LLUUID
&
classified_id
)
{
mClassifiedId
=
classified_id
;
}
void
setPosGlobal
(
const
LLVector3d
&
pos
)
{
mPosGlobal
=
pos
;
}
const
LLVector3d
getPosGlobal
()
const
{
return
mPosGlobal
;
}
void
setLocationText
(
const
std
::
string
location
)
{
mLocationText
=
location
;
}
void
setLocationText
(
const
std
::
string
location
)
{
mLocationText
=
std
::
move
(
location
)
;
}
std
::
string
getLocationText
()
const
{
return
mLocationText
;
}
void
setClassifiedName
(
const
std
::
string
&
name
);
std
::
string
getClassifiedName
()
const
{
return
getChild
<
LLUICtrl
>
(
"name"
)
->
getValue
().
asString
();
}
...
...
indra/newview/llfavoritesbar.cpp
View file @
5e95a3e0
...
...
@@ -848,7 +848,7 @@ void LLFavoritesBarCtrl::updateButtons()
}
LLButton
*
LLFavoritesBarCtrl
::
createButton
(
const
LLPointer
<
LLViewerInventoryItem
>
item
,
const
LLButton
::
Params
&
button_params
,
S32
x_offset
)
LLButton
*
LLFavoritesBarCtrl
::
createButton
(
const
LLPointer
<
LLViewerInventoryItem
>
&
item
,
const
LLButton
::
Params
&
button_params
,
S32
x_offset
)
{
S32
def_button_width
=
button_params
.
rect
.
width
;
S32
button_x_delta
=
button_params
.
rect
.
left
;
// default value
...
...
indra/newview/llfavoritesbar.h
View file @
5e95a3e0
...
...
@@ -77,7 +77,7 @@ public:
protected:
void
updateButtons
();
LLButton
*
createButton
(
const
LLPointer
<
LLViewerInventoryItem
>
item
,
const
LLButton
::
Params
&
button_params
,
S32
x_offset
);
LLButton
*
createButton
(
const
LLPointer
<
LLViewerInventoryItem
>
&
item
,
const
LLButton
::
Params
&
button_params
,
S32
x_offset
);
const
LLButton
::
Params
&
getButtonParams
();
BOOL
collectFavoriteItems
(
LLInventoryModel
::
item_array_t
&
items
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment