Commit ac2f9550 authored by Davis King's avatar Davis King

removed more double __

parent ca498ac2
......@@ -113,7 +113,7 @@ namespace dlib
private:
row(T* data_, long nc__) : data(data_), nc_(nc__) {}
row(T* data_, long cols) : data(data_), nc_(cols) {}
T* data;
long nc_;
......@@ -138,8 +138,8 @@ namespace dlib
}
array2d(
long nr__,
long nc__
long rows,
long cols
) :
data(0),
nc_(0),
......@@ -149,15 +149,15 @@ namespace dlib
at_start_(true)
{
// make sure requires clause is not broken
DLIB_ASSERT((nc__ >= 0 && nr__ >= 0),
"\t array2d::array2d(long nr__, long nc__)"
DLIB_ASSERT((cols >= 0 && rows >= 0),
"\t array2d::array2d(long rows, long cols)"
<< "\n\t The array2d can't have negative rows or columns."
<< "\n\t this: " << this
<< "\n\t nc__: " << nc__
<< "\n\t nr__: " << nr__
<< "\n\t cols: " << cols
<< "\n\t rows: " << rows
);
set_size(nr__,nc__);
set_size(rows,cols);
}
virtual ~array2d (
......@@ -230,8 +230,8 @@ namespace dlib
}
void set_size (
long nr__,
long nc__
long rows,
long cols
);
bool at_start (
......@@ -413,17 +413,17 @@ namespace dlib
>
void array2d<T,mem_manager>::
set_size (
long nr__,
long nc__
long rows,
long cols
)
{
// make sure requires clause is not broken
DLIB_ASSERT((nc__ >= 0 && nr__ >= 0) ,
"\tvoid array2d::set_size(long nr__, long nc__)"
DLIB_ASSERT((cols >= 0 && rows >= 0) ,
"\tvoid array2d::set_size(long rows, long cols)"
<< "\n\tThe array2d can't have negative rows or columns."
<< "\n\tthis: " << this
<< "\n\tnc__: " << nc__
<< "\n\tnr__: " << nr__
<< "\n\tcols: " << cols
<< "\n\trows: " << rows
);
// set the enumerator back at the start
......@@ -431,13 +431,13 @@ namespace dlib
cur = 0;
// don't do anything if we are already the right size.
if (nc_ == nc__ && nr_ == nr__)
if (nc_ == cols && nr_ == rows)
{
return;
}
nc_ = nc__;
nr_ = nr__;
nc_ = cols;
nr_ = rows;
// free any existing memory
if (data != 0)
......
......@@ -92,13 +92,13 @@ namespace dlib
{if ( !(_exp) ) \
{ \
dlib_assert_breakpoint(); \
std::ostringstream dlib__out; \
dlib__out << "\n\nError detected at line " << __LINE__ << ".\n"; \
dlib__out << "Error detected in file " << __FILE__ << ".\n"; \
dlib__out << "Error detected in function " << DLIB_FUNCTION_NAME << ".\n\n"; \
dlib__out << "Failing expression was " << #_exp << ".\n"; \
dlib__out << std::boolalpha << _message << "\n"; \
throw dlib::fatal_error(dlib::EBROKEN_ASSERT,dlib__out.str()); \
std::ostringstream dlib_o_out; \
dlib_o_out << "\n\nError detected at line " << __LINE__ << ".\n"; \
dlib_o_out << "Error detected in file " << __FILE__ << ".\n"; \
dlib_o_out << "Error detected in function " << DLIB_FUNCTION_NAME << ".\n\n"; \
dlib_o_out << "Failing expression was " << #_exp << ".\n"; \
dlib_o_out << std::boolalpha << _message << "\n"; \
throw dlib::fatal_error(dlib::EBROKEN_ASSERT,dlib_o_out.str()); \
}}
......
......@@ -96,18 +96,18 @@ namespace dlib
friend LRESULT CALLBACK gui_core_kernel_1_globals::WndProc (HWND, UINT, WPARAM, LPARAM);
canvas (
unsigned char* bits__,
unsigned long padding__,
unsigned long left__,
unsigned long top__,
unsigned long right__,
unsigned long bottom__
unsigned char* bits_,
unsigned long padding_,
unsigned long left_,
unsigned long top_,
unsigned long right_,
unsigned long bottom_
) :
rectangle(left__,top__,right__,bottom__),
bits(bits__),
rectangle(left_,top_,right_,bottom_),
bits(bits_),
width_(width()),
height_(height()),
row_width(width_*3+padding__)
row_width(width_*3+padding_)
{}
// restricted functions
......
......@@ -113,14 +113,14 @@ namespace dlib
canvas (
unsigned char* bits__,
unsigned long left__,
unsigned long top__,
unsigned long right__,
unsigned long bottom__
unsigned char* bits_,
unsigned long left_,
unsigned long top_,
unsigned long right_,
unsigned long bottom_
) :
rectangle(left__,top__,right__,bottom__),
bits(bits__),
rectangle(left_,top_,right_,bottom_),
bits(bits_),
width_(width()),
height_(height()),
row_width(width_*4)
......
......@@ -16,35 +16,35 @@ namespace dlib
{
void DLIB_FORTRAN_ID(dormqr) (char *side, char *trans, integer *m, integer *n,
integer *k, const double *a, integer *lda, const double *tau,
double * c__, integer *ldc, double *work, integer *lwork,
double * c_, integer *ldc, double *work, integer *lwork,
integer *info);
void DLIB_FORTRAN_ID(sormqr) (char *side, char *trans, integer *m, integer *n,
integer *k, const float *a, integer *lda, const float *tau,
float * c__, integer *ldc, float *work, integer *lwork,
float * c_, integer *ldc, float *work, integer *lwork,
integer *info);
}
inline int ormqr (char side, char trans, integer m, integer n,
integer k, const double *a, integer lda, const double *tau,
double *c__, integer ldc, double *work, integer lwork)
double *c_, integer ldc, double *work, integer lwork)
{
integer info = 0;
DLIB_FORTRAN_ID(dormqr)(&side, &trans, &m, &n,
&k, a, &lda, tau,
c__, &ldc, work, &lwork, &info);
c_, &ldc, work, &lwork, &info);
return info;
}
inline int ormqr (char side, char trans, integer m, integer n,
integer k, const float *a, integer lda, const float *tau,
float *c__, integer ldc, float *work, integer lwork)
float *c_, integer ldc, float *work, integer lwork)
{
integer info = 0;
DLIB_FORTRAN_ID(sormqr)(&side, &trans, &m, &n,
&k, a, &lda, tau,
c__, &ldc, work, &lwork, &info);
c_, &ldc, work, &lwork, &info);
return info;
}
......
......@@ -17,13 +17,13 @@ namespace dlib
void DLIB_FORTRAN_ID(dsyevr) (char *jobz, char *range, char *uplo, integer *n,
double *a, integer *lda, double *vl, double *vu, integer * il,
integer *iu, double *abstol, integer *m, double *w,
double *z__, integer *ldz, integer *isuppz, double *work,
double *z_, integer *ldz, integer *isuppz, double *work,
integer *lwork, integer *iwork, integer *liwork, integer *info);
void DLIB_FORTRAN_ID(ssyevr) (char *jobz, char *range, char *uplo, integer *n,
float *a, integer *lda, float *vl, float *vu, integer * il,
integer *iu, float *abstol, integer *m, float *w,
float *z__, integer *ldz, integer *isuppz, float *work,
float *z_, integer *ldz, integer *isuppz, float *work,
integer *lwork, integer *iwork, integer *liwork, integer *info);
}
......
......@@ -141,13 +141,13 @@ namespace dlib
template <typename EXP>
eigenvalue_decomposition<matrix_exp_type>::
eigenvalue_decomposition(
const matrix_exp<EXP>& A__
const matrix_exp<EXP>& A_
)
{
COMPILE_TIME_ASSERT((is_same_type<type, typename EXP::type>::value));
const_temp_matrix<EXP> A(A__);
const_temp_matrix<EXP> A(A_);
// make sure requires clause is not broken
DLIB_ASSERT(A.nr() == A.nc() && A.size() > 0,
......
......@@ -64,12 +64,12 @@ namespace dlib
struct op_subm
{
op_subm (
const M& m_,
const long& r__,
const long& c__,
const long& nr__,
const long& nc__
) : m(m_), r_(r__), c_(c__), nr_(nr__), nc_(nc__) { }
const M& m_x,
const long& r_x,
const long& c_x,
const long& nr_x,
const long& nc_x
) : m(m_x), r_(r_x), c_(c_x), nr_(nr_x), nc_(nc_x) { }
const M& m;
const long r_;
......
......@@ -69,15 +69,15 @@ namespace dlib
#define DLIB_CASSERT(_exp,_message) \
{if ( !(_exp) ) \
{ \
std::ostringstream dlib__out; \
dlib__out << "\n\nError occurred at line " << __LINE__ << ".\n"; \
dlib__out << "Error occurred in file " << __FILE__ << ".\n"; \
dlib__out << "Error occurred in function " << DLIB_FUNCTION_NAME << ".\n\n"; \
dlib__out << "Failing expression was " << #_exp << ".\n"; \
dlib__out << _message << "\n\n"; \
dlib__out << "Stack Trace: \n" << dlib::get_stack_trace() << "\n"; \
std::ostringstream dlib_o_out; \
dlib_o_out << "\n\nError occurred at line " << __LINE__ << ".\n"; \
dlib_o_out << "Error occurred in file " << __FILE__ << ".\n"; \
dlib_o_out << "Error occurred in function " << DLIB_FUNCTION_NAME << ".\n\n"; \
dlib_o_out << "Failing expression was " << #_exp << ".\n"; \
dlib_o_out << _message << "\n\n"; \
dlib_o_out << "Stack Trace: \n" << dlib::get_stack_trace() << "\n"; \
dlib_assert_breakpoint(); \
throw dlib::fatal_error(dlib::EBROKEN_ASSERT,dlib__out.str()); \
throw dlib::fatal_error(dlib::EBROKEN_ASSERT,dlib_o_out.str()); \
}}
......
......@@ -49,11 +49,11 @@ namespace test
test_count_mutex.unlock();
if ( !(_exp) )
{
std::ostringstream dlib__out;
dlib__out << "\n\nError occurred at line " << line << ".\n";
dlib__out << "Error occurred in file " << file << ".\n";
dlib__out << "Failing expression was " << _exp_str << ".\n";
throw dlib::error(dlib__out.str());
std::ostringstream dlib_o_out;
dlib_o_out << "\n\nError occurred at line " << line << ".\n";
dlib_o_out << "Error occurred in file " << file << ".\n";
dlib_o_out << "Failing expression was " << _exp_str << ".\n";
throw dlib::error(dlib_o_out.str());
}
}
......@@ -70,13 +70,13 @@ namespace test
tester::
tester (
const std::string& switch_name_,
const std::string& description__,
unsigned long num_of_args__
const std::string& switch_name_x,
const std::string& description_x,
unsigned long num_of_args_x
) :
switch_name(switch_name_),
description_(description__),
num_of_args_(num_of_args__)
switch_name(switch_name_x),
description_(description_x),
num_of_args_(num_of_args_x)
{
using namespace std;
if (testers().is_in_domain(switch_name))
......
......@@ -22,12 +22,12 @@
#define DLIB_TEST_MSG(_exp,_message) \
{increment_test_count(); if ( !(_exp) ) \
{ \
std::ostringstream dlib__out; \
dlib__out << "\n\nError occurred at line " << __LINE__ << ".\n"; \
dlib__out << "Error occurred in file " << __FILE__ << ".\n"; \
dlib__out << "Failing expression was " << #_exp << ".\n"; \
dlib__out << _message << "\n"; \
throw dlib::error(dlib__out.str()); \
std::ostringstream dlib_o_out; \
dlib_o_out << "\n\nError occurred at line " << __LINE__ << ".\n"; \
dlib_o_out << "Error occurred in file " << __FILE__ << ".\n"; \
dlib_o_out << "Failing expression was " << #_exp << ".\n"; \
dlib_o_out << _message << "\n"; \
throw dlib::error(dlib_o_out.str()); \
}}
namespace test
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment