Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
ECSS Services
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AcubeSat-OBC
ECSS Services
Commits
e66cedf4
Unverified
Commit
e66cedf4
authored
5 years ago
by
kongr45gpen
Browse files
Options
Downloads
Patches
Plain Diff
Remove noexcept, as the string.append functions may throw exceptions
parent
e6d520ca
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
inc/Logger.hpp
+3
-2
3 additions, 2 deletions
inc/Logger.hpp
src/Logger.cpp
+2
-2
2 additions, 2 deletions
src/Logger.cpp
src/Platform/x86/Logger.cpp
+1
-1
1 addition, 1 deletion
src/Platform/x86/Logger.cpp
with
6 additions
and
5 deletions
inc/Logger.hpp
+
3
−
2
View file @
e66cedf4
...
@@ -111,16 +111,17 @@ public:
...
@@ -111,16 +111,17 @@ public:
*
*
* @tparam T The type of value to append
* @tparam T The type of value to append
* @param value The new value to add
* @param value The new value to add
* @todo See if noexcept can be added here without triggering warnings
* @return The current Logger::LogEntry where the value has been appended
* @return The current Logger::LogEntry where the value has been appended
*/
*/
template
<
class
T
>
template
<
class
T
>
Logger
::
LogEntry
&
operator
<<
(
const
T
value
)
noexcept
{
Logger
::
LogEntry
&
operator
<<
(
const
T
value
)
{
etl
::
to_string
(
value
,
message
,
format
,
true
);
etl
::
to_string
(
value
,
message
,
format
,
true
);
return
*
this
;
return
*
this
;
}
}
Logger
::
LogEntry
&
operator
<<
(
const
std
::
string
&
value
)
noexcept
;
Logger
::
LogEntry
&
operator
<<
(
const
std
::
string
&
value
);
};
};
/**
/**
...
...
This diff is collapsed.
Click to expand it.
src/Logger.cpp
+
2
−
2
View file @
e66cedf4
...
@@ -4,14 +4,14 @@ etl::format_spec Logger::format;
...
@@ -4,14 +4,14 @@ etl::format_spec Logger::format;
// Reimplementation of the function for variable C strings
// Reimplementation of the function for variable C strings
template
<
>
template
<
>
Logger
::
LogEntry
&
Logger
::
LogEntry
::
operator
<<
(
char
*
value
)
noexcept
{
Logger
::
LogEntry
&
Logger
::
LogEntry
::
operator
<<
(
char
*
value
)
{
message
.
append
(
value
);
message
.
append
(
value
);
return
*
this
;
return
*
this
;
}
}
// Reimplementation of the function for C strings
// Reimplementation of the function for C strings
template
<
>
template
<
>
Logger
::
LogEntry
&
Logger
::
LogEntry
::
operator
<<
(
const
char
*
value
)
noexcept
{
Logger
::
LogEntry
&
Logger
::
LogEntry
::
operator
<<
(
const
char
*
value
)
{
message
.
append
(
value
);
message
.
append
(
value
);
return
*
this
;
return
*
this
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/Platform/x86/Logger.cpp
+
1
−
1
View file @
e66cedf4
...
@@ -61,7 +61,7 @@ void Logger::log(Logger::LogLevel level, etl::istring & message) {
...
@@ -61,7 +61,7 @@ void Logger::log(Logger::LogLevel level, etl::istring & message) {
// Reimplementation of the log function for C++ strings
// Reimplementation of the log function for C++ strings
// This is kept in the Platform files, since we don't want to mess with std::strings in the microcontroller
// This is kept in the Platform files, since we don't want to mess with std::strings in the microcontroller
Logger
::
LogEntry
&
Logger
::
LogEntry
::
operator
<<
(
const
std
::
string
&
value
)
noexcept
{
Logger
::
LogEntry
&
Logger
::
LogEntry
::
operator
<<
(
const
std
::
string
&
value
)
{
message
.
append
(
value
.
c_str
());
message
.
append
(
value
.
c_str
());
return
*
this
;
return
*
this
;
...
...
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