Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
554d6779
Commit
554d6779
authored
Oct 16, 2012
by
Davis King
Browse files
Added missing asserts
parent
37b725d5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
dlib/bsp/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