Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
a1cb4a0b
Commit
a1cb4a0b
authored
Feb 23, 2015
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some cppcheck style nitpicks
parent
7a89b0ff
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
14 deletions
+7
-14
libcaf_core/src/logging.cpp
libcaf_core/src/logging.cpp
+6
-3
libcaf_core/src/string_serialization.cpp
libcaf_core/src/string_serialization.cpp
+0
-10
unit_testing/test_intrusive_containers.cpp
unit_testing/test_intrusive_containers.cpp
+1
-1
No files found.
libcaf_core/src/logging.cpp
View file @
a1cb4a0b
...
@@ -55,7 +55,10 @@ struct log_event {
...
@@ -55,7 +55,10 @@ struct log_event {
log_event
*
next
;
log_event
*
next
;
log_event
*
prev
;
log_event
*
prev
;
std
::
string
msg
;
std
::
string
msg
;
log_event
(
std
::
string
logmsg
=
""
)
:
msg
(
std
::
move
(
logmsg
))
{
log_event
(
std
::
string
logmsg
=
""
)
:
next
(
nullptr
),
prev
(
nullptr
),
msg
(
std
::
move
(
logmsg
))
{
// nop
// nop
}
}
};
};
...
@@ -68,7 +71,7 @@ struct log_event {
...
@@ -68,7 +71,7 @@ struct log_event {
class
logging_impl
:
public
logging
{
class
logging_impl
:
public
logging
{
public:
public:
void
initialize
()
{
void
initialize
()
override
{
const
char
*
log_level_table
[]
=
{
"ERROR"
,
"WARN"
,
"INFO"
,
"DEBUG"
,
"TRACE"
};
const
char
*
log_level_table
[]
=
{
"ERROR"
,
"WARN"
,
"INFO"
,
"DEBUG"
,
"TRACE"
};
m_thread
=
std
::
thread
([
this
]
{
(
*
this
)();
});
m_thread
=
std
::
thread
([
this
]
{
(
*
this
)();
});
std
::
string
msg
=
"ENTRY log level = "
;
std
::
string
msg
=
"ENTRY log level = "
;
...
@@ -76,7 +79,7 @@ class logging_impl : public logging {
...
@@ -76,7 +79,7 @@ class logging_impl : public logging {
log
(
"TRACE"
,
"logging"
,
"run"
,
__FILE__
,
__LINE__
,
msg
);
log
(
"TRACE"
,
"logging"
,
"run"
,
__FILE__
,
__LINE__
,
msg
);
}
}
void
stop
()
{
void
stop
()
override
{
log
(
"TRACE"
,
"logging"
,
"run"
,
__FILE__
,
__LINE__
,
"EXIT"
);
log
(
"TRACE"
,
"logging"
,
"run"
,
__FILE__
,
__LINE__
,
"EXIT"
);
// an empty string means: shut down
// an empty string means: shut down
m_queue
.
synchronized_enqueue
(
m_queue_mtx
,
m_queue_cv
,
new
log_event
{
""
});
m_queue
.
synchronized_enqueue
(
m_queue_mtx
,
m_queue_cv
,
new
log_event
{
""
});
...
...
libcaf_core/src/string_serialization.cpp
View file @
a1cb4a0b
...
@@ -196,16 +196,6 @@ class string_serializer : public serializer, public dummy_backend {
...
@@ -196,16 +196,6 @@ class string_serializer : public serializer, public dummy_backend {
m_after_value
=
true
;
m_after_value
=
true
;
}
}
void
write_tuple
(
size_t
size
,
const
primitive_variant
*
values
)
{
clear
();
out
<<
"{"
;
const
primitive_variant
*
end
=
values
+
size
;
for
(;
values
!=
end
;
++
values
)
{
write_value
(
*
values
);
}
out
<<
(
m_after_value
?
" }"
:
"}"
);
}
void
write_raw
(
size_t
num_bytes
,
const
void
*
buf
)
{
void
write_raw
(
size_t
num_bytes
,
const
void
*
buf
)
{
clear
();
clear
();
auto
first
=
reinterpret_cast
<
const
unsigned
char
*>
(
buf
);
auto
first
=
reinterpret_cast
<
const
unsigned
char
*>
(
buf
);
...
...
unit_testing/test_intrusive_containers.cpp
View file @
a1cb4a0b
...
@@ -69,7 +69,7 @@ struct pseudo_actor {
...
@@ -69,7 +69,7 @@ struct pseudo_actor {
return
mbox
;
return
mbox
;
}
}
policy
::
invoke_message_result
invoke_message
(
uptr
&
ptr
,
int
i
)
{
static
policy
::
invoke_message_result
invoke_message
(
uptr
&
ptr
,
int
i
)
{
if
(
ptr
->
value
==
1
)
{
if
(
ptr
->
value
==
1
)
{
ptr
.
reset
();
ptr
.
reset
();
return
policy
::
im_dropped
;
return
policy
::
im_dropped
;
...
...
Write
Preview
Markdown
is supported
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