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
494d7673
Commit
494d7673
authored
Jan 03, 2020
by
Rye Mutt
🍞
Browse files
Reduce copies with const refs and moves in various ll libs
parent
5dc32ae2
Changes
7
Hide whitespace changes
Inline
Side-by-side
indra/llcommon/lltrace.h
View file @
494d7673
...
...
@@ -294,7 +294,7 @@ struct MeasureMem<T*, IS_MEM_TRACKABLE, IS_BYTES>
template
<
typename
T
,
typename
IS_MEM_TRACKABLE
,
typename
IS_BYTES
>
struct
MeasureMem
<
LLPointer
<
T
>
,
IS_MEM_TRACKABLE
,
IS_BYTES
>
{
static
size_t
measureFootprint
(
const
LLPointer
<
T
>
value
)
static
size_t
measureFootprint
(
const
LLPointer
<
T
>
&
value
)
{
if
(
value
.
isNull
())
{
...
...
indra/llcommon/lluuid.h
View file @
494d7673
...
...
@@ -57,7 +57,8 @@ public:
explicit
LLUUID
(
const
char
*
in_string
);
// Convert from string.
explicit
LLUUID
(
const
std
::
string
&
in_string
);
// Convert from string.
LLUUID
(
const
LLUUID
&
rhs
)
=
default
;
LLUUID
&
operator
=
(
const
LLUUID
&
rhs
)
=
default
;
LLUUID
&
operator
=
(
const
LLUUID
&
rhs
)
=
default
;
LLUUID
&
operator
=
(
LLUUID
&&
rhs
)
=
default
;
~
LLUUID
()
=
default
;
//
...
...
indra/llinventory/llparcel.h
View file @
494d7673
...
...
@@ -582,7 +582,7 @@ public:
void
setRegionAllowAccessOverride
(
BOOL
override
)
{
mRegionAllowAccessoverride
=
override
;
}
// Accessors for parcel sellWithObjects
void
setPreviousOwnerID
(
LLUUID
prev_owner
)
{
mPreviousOwnerID
=
prev_owner
;
}
void
setPreviousOwnerID
(
const
LLUUID
&
prev_owner
)
{
mPreviousOwnerID
=
prev_owner
;
}
void
setPreviouslyGroupOwned
(
BOOL
b
)
{
mPreviouslyGroupOwned
=
b
;
}
void
setSellWithObjects
(
BOOL
b
)
{
setParcelFlag
(
PF_SELL_PARCEL_OBJECTS
,
b
);
}
...
...
indra/llplugin/llpluginclassmedia.h
View file @
494d7673
...
...
@@ -86,7 +86,7 @@ public:
void
setAutoScale
(
bool
auto_scale
);
void
setZoomFactor
(
F64
zoom_factor
)
{
mZoomFactor
=
zoom_factor
;
}
void
setBackgroundColor
(
LLColor4
color
)
{
mBackgroundColor
=
color
;
};
void
setBackgroundColor
(
const
LLColor4
&
color
)
{
mBackgroundColor
=
color
;
};
void
setOwner
(
LLPluginClassMediaOwner
*
owner
)
{
mOwner
=
owner
;
};
...
...
@@ -148,7 +148,7 @@ public:
// "Exited" means any regular or error state after "Running" (plugin may have crashed or exited normally)
bool
isPluginExited
(
void
)
{
return
mPlugin
?
mPlugin
->
isDone
()
:
false
;
};
std
::
string
getPluginVersion
()
{
return
mPlugin
?
mPlugin
->
getPluginVersion
()
:
std
::
string
(
""
);
};
std
::
string
getPluginVersion
()
{
return
mPlugin
?
mPlugin
->
getPluginVersion
()
:
std
::
string
();
};
bool
getDisableTimeout
()
{
return
mPlugin
?
mPlugin
->
getDisableTimeout
()
:
false
;
};
void
setDisableTimeout
(
bool
disable
)
{
if
(
mPlugin
)
mPlugin
->
setDisableTimeout
(
disable
);
};
...
...
indra/llrender/llfontfreetype.h
View file @
494d7673
...
...
@@ -59,11 +59,10 @@ private:
struct
LoadedFont
{
LoadedFont
(
std
::
string
aName
,
std
::
unique_ptr
<
U8
[]
>
aAddress
,
long
aSize
)
:
mAddress
(
std
::
move
(
aAddress
))
{
mName
=
aName
;
mSize
=
aSize
;
}
:
mName
(
std
::
move
(
aName
))
,
mAddress
(
std
::
move
(
aAddress
))
,
mSize
(
aSize
)
{
}
std
::
string
mName
;
std
::
unique_ptr
<
U8
[]
>
mAddress
;
...
...
indra/llui/lliconctrl.h
View file @
494d7673
...
...
@@ -75,7 +75,7 @@ public:
std
::
string
getImageName
()
const
;
void
setColor
(
const
LLColor4
&
color
)
override
{
mColor
=
color
;
}
void
setImage
(
LLPointer
<
LLUIImage
>
image
)
{
mImagep
=
image
;
}
void
setImage
(
LLPointer
<
LLUIImage
>
image
)
{
mImagep
=
std
::
move
(
image
)
;
}
const
LLPointer
<
LLUIImage
>
getImage
()
const
{
return
mImagep
;
}
protected:
...
...
indra/llui/lltextbase.h
View file @
494d7673
...
...
@@ -130,7 +130,7 @@ public:
/*virtual*/
bool
canEdit
()
const
override
{
return
true
;
}
/*virtual*/
const
LLColor4
&
getColor
()
const
override
{
return
mStyle
->
getColor
();
}
/*virtual*/
LLStyleConstSP
getStyle
()
const
override
{
return
mStyle
;
}
/*virtual*/
void
setStyle
(
LLStyleConstSP
style
)
override
{
mStyle
=
style
;
}
/*virtual*/
void
setStyle
(
LLStyleConstSP
style
)
override
{
mStyle
=
std
::
move
(
style
)
;
}
/*virtual*/
void
setToken
(
LLKeywordToken
*
token
)
override
{
mToken
=
token
;
}
/*virtual*/
LLKeywordToken
*
getToken
()
const
override
{
return
mToken
;
}
/*virtual*/
BOOL
getToolTip
(
std
::
string
&
msg
)
const
;
...
...
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