Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
partons
core
elementary-utils
Commits
c1def164
Commit
c1def164
authored
Apr 01, 2017
by
Bryan Berthou
Browse files
refs#16
In ElementaryUtils (trunk) : - Add a clear() method in Formatter class.
parent
3116cb54
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/ElementaryUtils/string_utils/Formatter.h
View file @
c1def164
...
@@ -10,9 +10,11 @@
...
@@ -10,9 +10,11 @@
*/
*/
#include <iomanip>
#include <iomanip>
#include <limits>
#include <sstream>
#include <sstream>
#include <string>
#include <string>
#include <limits>
#include "StringUtils.h"
namespace
ElemUtils
{
namespace
ElemUtils
{
...
@@ -64,6 +66,11 @@ public:
...
@@ -64,6 +66,11 @@ public:
void
print
();
void
print
();
void
clear
()
{
m_stream
.
clear
();
m_stream
.
str
(
StringUtils
::
EMPTY
);
}
private:
private:
std
::
stringstream
m_stream
;
std
::
stringstream
m_stream
;
...
...
src/ElementaryUtils/parameters/GenericType.cpp
View file @
c1def164
...
@@ -129,7 +129,7 @@ GenericType& ElemUtils::GenericType::operator =(const GenericType& rhs) {
...
@@ -129,7 +129,7 @@ GenericType& ElemUtils::GenericType::operator =(const GenericType& rhs) {
}
}
void
ElemUtils
::
GenericType
::
setValue
(
const
GenericType
&
value
)
{
void
ElemUtils
::
GenericType
::
setValue
(
const
GenericType
&
value
)
{
// clear current stream
then copy it from other object
// clear current stream
before adding new value
m_stream
.
clear
();
m_stream
.
clear
();
m_stream
.
str
(
StringUtils
::
EMPTY
);
m_stream
.
str
(
StringUtils
::
EMPTY
);
m_stream
<<
value
.
m_stream
.
str
();
m_stream
<<
value
.
m_stream
.
str
();
...
...
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