mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
Added some missing requires clauses and asserts
--HG-- extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402391
This commit is contained in:
parent
697df854f9
commit
f9d1f4d71e
@ -43,6 +43,14 @@ namespace dlib
|
||||
my_tolerance(tolerance_),
|
||||
my_max_dictionary_size(max_dictionary_size_)
|
||||
{
|
||||
// make sure requires clause is not broken
|
||||
DLIB_ASSERT(tolerance_ >= 0,
|
||||
"\tkcentroid::kcentroid()"
|
||||
<< "\n\t You have to give a positive tolerance"
|
||||
<< "\n\t this: " << this
|
||||
<< "\n\t tolerance: " << tolerance_
|
||||
);
|
||||
|
||||
clear_dictionary();
|
||||
}
|
||||
|
||||
|
@ -55,6 +55,8 @@ namespace dlib
|
||||
unsigned long max_dictionary_size_ = 1000000
|
||||
);
|
||||
/*!
|
||||
requires
|
||||
- tolerance >= 0
|
||||
ensures
|
||||
- this object is properly initialized
|
||||
- #tolerance() == tolerance_
|
||||
|
@ -38,6 +38,14 @@ namespace dlib
|
||||
my_tolerance(tolerance_),
|
||||
my_max_dictionary_size(max_dictionary_size_)
|
||||
{
|
||||
// make sure requires clause is not broken
|
||||
DLIB_ASSERT(tolerance_ >= 0,
|
||||
"\tkrls::krls()"
|
||||
<< "\n\t You have to give a positive tolerance"
|
||||
<< "\n\t this: " << this
|
||||
<< "\n\t tolerance: " << tolerance_
|
||||
);
|
||||
|
||||
clear_dictionary();
|
||||
}
|
||||
|
||||
|
@ -53,6 +53,8 @@ namespace dlib
|
||||
unsigned long max_dictionary_size_ = 1000000
|
||||
);
|
||||
/*!
|
||||
requires
|
||||
- tolerance >= 0
|
||||
ensures
|
||||
- this object is properly initialized
|
||||
- #tolerance() == tolerance_
|
||||
|
Loading…
Reference in New Issue
Block a user