Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
045af3ac
Commit
045af3ac
authored
14 years ago
by
Vladimir Pchelko
Browse files
Options
Downloads
Plain Diff
merge
--HG-- branch : product-engine
parents
d17b616b
d0dd18a9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/llinventory/llinventory.cpp
+13
-14
13 additions, 14 deletions
indra/llinventory/llinventory.cpp
indra/llinventory/llinventory.h
+5
-1
5 additions, 1 deletion
indra/llinventory/llinventory.h
with
18 additions
and
15 deletions
indra/llinventory/llinventory.cpp
+
13
−
14
View file @
045af3ac
...
...
@@ -85,10 +85,7 @@ LLInventoryObject::LLInventoryObject(const LLUUID& uuid,
mType
(
type
),
mName
(
name
)
{
LLStringUtil
::
replaceNonstandardASCII
(
mName
,
' '
);
LLStringUtil
::
replaceChar
(
mName
,
'|'
,
' '
);
LLStringUtil
::
trim
(
mName
);
LLStringUtil
::
truncate
(
mName
,
DB_INV_ITEM_NAME_STR_LEN
);
correctInventoryName
(
mName
);
}
LLInventoryObject
::
LLInventoryObject
()
:
...
...
@@ -155,12 +152,8 @@ void LLInventoryObject::setUUID(const LLUUID& new_uuid)
void
LLInventoryObject
::
rename
(
const
std
::
string
&
n
)
{
std
::
string
new_name
(
n
);
LLStringUtil
::
replaceNonstandardASCII
(
new_name
,
' '
);
LLStringUtil
::
replaceChar
(
new_name
,
'|'
,
' '
);
LLStringUtil
::
trim
(
new_name
);
LLStringUtil
::
truncate
(
new_name
,
DB_INV_ITEM_NAME_STR_LEN
);
if
(
new_name
!=
mName
)
correctInventoryName
(
new_name
);
if
(
!
new_name
.
empty
()
&&
new_name
!=
mName
)
{
mName
=
new_name
;
}
...
...
@@ -221,10 +214,7 @@ BOOL LLInventoryObject::importLegacyStream(std::istream& input_stream)
" %254s %254[^|]"
,
keyword
,
valuestr
);
mName
.
assign
(
valuestr
);
LLStringUtil
::
replaceNonstandardASCII
(
mName
,
' '
);
LLStringUtil
::
replaceChar
(
mName
,
'|'
,
' '
);
LLStringUtil
::
trim
(
mName
);
LLStringUtil
::
truncate
(
mName
,
DB_INV_ITEM_NAME_STR_LEN
);
correctInventoryName
(
mName
);
}
else
{
...
...
@@ -284,6 +274,15 @@ void LLInventoryObject::updateServer(BOOL) const
llwarns
<<
"LLInventoryObject::updateServer() called. Doesn't do anything."
<<
llendl
;
}
inline
void
LLInventoryObject
::
correctInventoryName
(
std
::
string
&
name
)
{
LLStringUtil
::
replaceNonstandardASCII
(
name
,
' '
);
LLStringUtil
::
replaceChar
(
name
,
'|'
,
' '
);
LLStringUtil
::
trim
(
name
);
LLStringUtil
::
truncate
(
name
,
DB_INV_ITEM_NAME_STR_LEN
);
}
///----------------------------------------------------------------------------
/// Class LLInventoryItem
...
...
This diff is collapsed.
Click to expand it.
indra/llinventory/llinventory.h
+
5
−
1
View file @
045af3ac
...
...
@@ -92,9 +92,13 @@ class LLInventoryObject : public LLRefCount
void
setParent
(
const
LLUUID
&
new_parent
);
void
setType
(
LLAssetType
::
EType
type
);
private:
// in place correction for inventory name string
void
correctInventoryName
(
std
::
string
&
name
);
//--------------------------------------------------------------------
// File Support
// Implemented here so that a minimal information set can be transmitted
// Implemented here so that a minimal information set can be transmitted
// between simulator and viewer.
//--------------------------------------------------------------------
public:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment