Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pistache
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
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
Libraries
pistache
Commits
b88af74d
Unverified
Commit
b88af74d
authored
Nov 12, 2018
by
Dennis Jenkins
Committed by
GitHub
Nov 12, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #348 from knowledge4igor/code_style_improvements_1
Tiny codestyle improvements
parents
4b351fc9
fcbf4473
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
15 deletions
+14
-15
include/pistache/async.h
include/pistache/async.h
+9
-9
include/pistache/client.h
include/pistache/client.h
+1
-1
include/pistache/description.h
include/pistache/description.h
+2
-2
src/client/client.cc
src/client/client.cc
+1
-1
src/common/description.cc
src/common/description.cc
+1
-2
No files found.
include/pistache/async.h
View file @
b88af74d
...
...
@@ -238,9 +238,9 @@ namespace Async {
return
*
reinterpret_cast
<
T
*>
(
&
storage
);
}
bool
isVoid
()
const
{
return
false
;
}
bool
isVoid
()
const
override
{
return
false
;
}
void
*
memory
()
{
void
*
memory
()
override
{
return
&
storage
;
}
};
...
...
@@ -251,9 +251,9 @@ namespace Async {
:
Core
(
State
::
Pending
,
TypeId
::
of
<
void
>
())
{
}
bool
isVoid
()
const
{
return
true
;
}
bool
isVoid
()
const
override
{
return
true
;
}
void
*
memory
()
{
void
*
memory
()
override
{
return
nullptr
;
}
};
...
...
@@ -266,7 +266,7 @@ namespace Async {
,
chain_
(
chain
)
{
}
void
resolve
(
const
std
::
shared_ptr
<
Core
>&
core
)
{
void
resolve
(
const
std
::
shared_ptr
<
Core
>&
core
)
override
{
if
(
resolveCount_
>=
1
)
throw
Error
(
"Resolve must not be called more than once"
);
...
...
@@ -274,7 +274,7 @@ namespace Async {
++
resolveCount_
;
}
void
reject
(
const
std
::
shared_ptr
<
Core
>&
core
)
{
void
reject
(
const
std
::
shared_ptr
<
Core
>&
core
)
override
{
if
(
rejectCount_
>=
1
)
throw
Error
(
"Reject must not be called more than once"
);
...
...
@@ -1009,9 +1009,9 @@ namespace Async {
return
Promise
<
T
>
(
std
::
move
(
core
));
}
bool
isPending
()
const
{
return
core_
->
state
==
State
::
Pending
;
}
bool
isFulfilled
()
const
{
return
core_
->
state
==
State
::
Fulfilled
;
}
bool
isRejected
()
const
{
return
core_
->
state
==
State
::
Rejected
;
}
bool
isPending
()
const
override
{
return
core_
->
state
==
State
::
Pending
;
}
bool
isFulfilled
()
const
override
{
return
core_
->
state
==
State
::
Fulfilled
;
}
bool
isRejected
()
const
override
{
return
core_
->
state
==
State
::
Rejected
;
}
template
<
typename
ResolveFunc
,
typename
RejectFunc
>
auto
...
...
include/pistache/client.h
View file @
b88af74d
...
...
@@ -73,7 +73,7 @@ struct Connection : public std::enable_shared_from_this<Connection> {
Connected
};
void
connect
(
Address
addr
);
void
connect
(
const
Address
&
addr
);
void
close
();
bool
isIdle
()
const
;
bool
isConnected
()
const
;
...
...
include/pistache/description.h
View file @
b88af74d
...
...
@@ -218,7 +218,7 @@ struct PathDecl {
};
struct
Path
{
Path
(
std
::
string
path
,
Http
::
Method
method
,
std
::
string
description
);
Path
(
std
::
string
value
,
Http
::
Method
method
,
std
::
string
description
);
std
::
string
value
;
Http
::
Method
method
;
...
...
@@ -364,7 +364,7 @@ private:
struct
SubPath
{
SubPath
(
std
::
string
prefix
,
PathGroup
*
paths
);
PathBuilder
route
(
std
::
string
path
,
Http
::
Method
method
,
std
::
string
description
=
""
);
PathBuilder
route
(
std
::
string
name
,
Http
::
Method
method
,
std
::
string
description
=
""
);
PathBuilder
route
(
PathDecl
fragment
,
std
::
string
description
=
""
);
SubPath
path
(
std
::
string
prefix
);
...
...
src/client/client.cc
View file @
b88af74d
...
...
@@ -358,7 +358,7 @@ Transport::handleTimeout(const std::shared_ptr<Connection>& connection) {
}
void
Connection
::
connect
(
Address
addr
)
Connection
::
connect
(
const
Address
&
addr
)
{
struct
addrinfo
hints
;
struct
addrinfo
*
addrs
;
...
...
src/common/description.cc
View file @
b88af74d
...
...
@@ -56,8 +56,7 @@ PathDecl::PathDecl(
,
method
(
method
)
{
}
Path
::
Path
(
std
::
string
value
,
Http
::
Method
method
,
std
::
string
description
)
Path
::
Path
(
std
::
string
value
,
Http
::
Method
method
,
std
::
string
description
)
:
value
(
std
::
move
(
value
))
,
method
(
method
)
,
description
(
std
::
move
(
description
))
...
...
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