Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
opendht
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Model registry
Analyze
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
savoirfairelinux
opendht
Commits
64d52f74
Commit
64d52f74
authored
9 years ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
tools: more constness
parent
5e265505
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/tools_common.h
+7
-7
7 additions, 7 deletions
tools/tools_common.h
with
7 additions
and
7 deletions
tools/tools_common.h
+
7
−
7
View file @
64d52f74
...
...
@@ -56,19 +56,19 @@ namespace Color {
BG_DEFAULT
=
49
};
class
Modifier
{
Code
code
;
const
Code
code
;
public:
Modifier
(
Code
pCode
)
:
code
(
pCode
)
{}
constexpr
Modifier
(
Code
pCode
)
:
code
(
pCode
)
{}
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
Modifier
&
mod
)
{
return
os
<<
"
\033
["
<<
mod
.
code
<<
"m"
;
return
os
<<
"
\033
["
<<
mod
.
code
<<
'm'
;
}
};
}
const
Color
::
Modifier
def
(
Color
::
FG_DEFAULT
);
const
Color
::
Modifier
red
(
Color
::
FG_RED
);
const
Color
::
Modifier
yellow
(
Color
::
FG_YELLOW
);
constexpr
const
Color
::
Modifier
def
(
Color
::
FG_DEFAULT
);
constexpr
const
Color
::
Modifier
red
(
Color
::
FG_RED
);
constexpr
const
Color
::
Modifier
yellow
(
Color
::
FG_YELLOW
);
/**
* Print va_list to std::ostream (used for logging).
...
...
@@ -145,7 +145,7 @@ struct dht_params {
std
::
pair
<
std
::
string
,
std
::
string
>
bootstrap
{};
};
static
const
struct
option
long_options
[]
=
{
static
const
constexpr
struct
option
long_options
[]
=
{
{
"help"
,
no_argument
,
nullptr
,
'h'
},
{
"port"
,
required_argument
,
nullptr
,
'p'
},
{
"bootstrap"
,
optional_argument
,
nullptr
,
'b'
},
...
...
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