Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
554d6779
Commit
554d6779
authored
Oct 17, 2012
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added missing asserts
parent
37b725d5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
bsp.h
dlib/bsp/bsp.h
+40
-0
No files found.
dlib/bsp/bsp.h
View file @
554d6779
...
...
@@ -295,6 +295,16 @@ namespace dlib
unsigned
long
target_node_id
)
{
// make sure requires clause is not broken
DLIB_ASSERT
(
target_node_id
<
number_of_nodes
()
&&
target_node_id
!=
node_id
(),
"
\t
void bsp_context::send()"
<<
"
\n\t
Invalid arguments were given to this function."
<<
"
\n\t
target_node_id: "
<<
target_node_id
<<
"
\n\t
number_of_nodes(): "
<<
number_of_nodes
()
<<
"
\n\t
this: "
<<
this
);
std
::
ostringstream
sout
;
serialize
(
item
,
sout
);
send_data
(
sout
.
str
(),
target_node_id
);
...
...
@@ -686,6 +696,12 @@ namespace dlib
funct_type
funct
)
{
// make sure requires clause is not broken
DLIB_ASSERT
(
listening_port
!=
0
,
"
\t
void bsp_listen()"
<<
"
\n\t
Invalid arguments were given to this function."
);
bsp_listen_dynamic_port
(
listening_port
,
impl1
::
null_notify
,
funct
);
}
...
...
@@ -701,6 +717,12 @@ namespace dlib
ARG1
arg1
)
{
// make sure requires clause is not broken
DLIB_ASSERT
(
listening_port
!=
0
,
"
\t
void bsp_listen()"
<<
"
\n\t
Invalid arguments were given to this function."
);
bsp_listen_dynamic_port
(
listening_port
,
impl1
::
null_notify
,
funct
,
arg1
);
}
...
...
@@ -718,6 +740,12 @@ namespace dlib
ARG2
arg2
)
{
// make sure requires clause is not broken
DLIB_ASSERT
(
listening_port
!=
0
,
"
\t
void bsp_listen()"
<<
"
\n\t
Invalid arguments were given to this function."
);
bsp_listen_dynamic_port
(
listening_port
,
impl1
::
null_notify
,
funct
,
arg1
,
arg2
);
}
...
...
@@ -737,6 +765,12 @@ namespace dlib
ARG3
arg3
)
{
// make sure requires clause is not broken
DLIB_ASSERT
(
listening_port
!=
0
,
"
\t
void bsp_listen()"
<<
"
\n\t
Invalid arguments were given to this function."
);
bsp_listen_dynamic_port
(
listening_port
,
impl1
::
null_notify
,
funct
,
arg1
,
arg2
,
arg3
);
}
...
...
@@ -758,6 +792,12 @@ namespace dlib
ARG4
arg4
)
{
// make sure requires clause is not broken
DLIB_ASSERT
(
listening_port
!=
0
,
"
\t
void bsp_listen()"
<<
"
\n\t
Invalid arguments were given to this function."
);
bsp_listen_dynamic_port
(
listening_port
,
impl1
::
null_notify
,
funct
,
arg1
,
arg2
,
arg3
,
arg4
);
}
...
...
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