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
70c6f4cd
Commit
70c6f4cd
authored
Feb 19, 2020
by
Rye Mutt
🍞
Browse files
Change some llerror and llevents internal maps and sets to flat_hash variants
parent
f4f15b8b
Changes
2
Hide whitespace changes
Inline
Side-by-side
indra/llcommon/llerror.cpp
View file @
70c6f4cd
...
...
@@ -429,7 +429,7 @@ namespace
}
typedef
std
::
map
<
std
::
string
,
LLError
::
ELevel
>
LevelMap
;
typedef
absl
::
flat_hash_
map
<
std
::
string
,
LLError
::
ELevel
>
LevelMap
;
typedef
std
::
vector
<
LLError
::
RecorderPtr
>
Recorders
;
typedef
std
::
vector
<
LLError
::
CallSite
*>
CallSiteVector
;
...
...
@@ -492,7 +492,7 @@ namespace LLError
LevelMap
mClassLevelMap
;
LevelMap
mFileLevelMap
;
LevelMap
mTagLevelMap
;
std
::
map
<
std
::
string
,
unsigned
int
>
mUniqueLogMessages
;
absl
::
flat_hash_
map
<
std
::
string
,
unsigned
int
>
mUniqueLogMessages
;
LLError
::
FatalFunction
mCrashFunction
;
LLError
::
TimeFunction
mTimeFunction
;
...
...
@@ -856,7 +856,7 @@ namespace {
LLSD
::
array_const_iterator
i
,
end
;
for
(
i
=
list
.
beginArray
(),
end
=
list
.
endArray
();
i
!=
end
;
++
i
)
{
map
[
*
i
]
=
level
;
map
[
(
*
i
).
asString
()
]
=
level
;
}
}
}
...
...
@@ -1368,7 +1368,7 @@ namespace LLError
{
std
::
ostringstream
message_stream
;
std
::
map
<
std
::
string
,
unsigned
int
>::
itera
to
r
messageIter
=
s
->
mUniqueLogMessages
.
find
(
message
);
const
au
to
messageIter
=
s
->
mUniqueLogMessages
.
find
(
message
);
if
(
messageIter
!=
s
->
mUniqueLogMessages
.
end
())
{
messageIter
->
second
++
;
...
...
indra/llcommon/llevents.h
View file @
70c6f4cd
...
...
@@ -53,6 +53,9 @@
#include
"llexception.h"
#include
"llhandle.h"
#include
"absl/container/node_hash_map.h"
#include
"absl/container/node_hash_set.h"
/*==========================================================================*|
// override this to allow binding free functions with more parameters
#ifndef LLEVENTS_LISTENER_ARITY
...
...
@@ -280,16 +283,16 @@ testable:
// LLEventPump subclass statically, as a class member, on the stack or on
// the heap. In such cases, the instantiating party is responsible for its
// lifespan.
typedef
std
::
map
<
std
::
string
,
LLEventPump
*>
PumpMap
;
typedef
absl
::
node_hash_
map
<
std
::
string
,
LLEventPump
*>
PumpMap
;
PumpMap
mPumpMap
;
// Set of all LLEventPumps we instantiated. Membership in this set means
// we claim ownership, and will delete them when this LLEventPumps is
// destroyed.
typedef
std
::
set
<
LLEventPump
*>
PumpSet
;
typedef
absl
::
node_hash_
set
<
LLEventPump
*>
PumpSet
;
PumpSet
mOurPumps
;
// LLEventPump names that should be instantiated as LLEventQueue rather
// than as LLEventStream
typedef
std
::
set
<
std
::
string
>
PumpNames
;
typedef
absl
::
node_hash_
set
<
std
::
string
>
PumpNames
;
PumpNames
mQueueNames
;
};
...
...
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