FT field_type changed to const FT & field_type in functions arguments
This commit is contained in:
@@ -344,7 +344,7 @@ void DbConnector::unescape_hex_string(const char * str, std::string & out)
|
||||
}
|
||||
|
||||
|
||||
void DbConnector::unescape_hex_string(const char * str, std::wstring & out, FT field_type)
|
||||
void DbConnector::unescape_hex_string(const char * str, std::wstring & out, const FT & field_type)
|
||||
{
|
||||
if( field_type.use_utf8() )
|
||||
{
|
||||
@@ -373,7 +373,7 @@ void DbConnector::unescape_bin_string(const char * str, std::string & out)
|
||||
}
|
||||
|
||||
|
||||
void DbConnector::unescape_bin_string(const char * str, std::wstring & out, FT field_type)
|
||||
void DbConnector::unescape_bin_string(const char * str, std::wstring & out, const FT & field_type)
|
||||
{
|
||||
unescape_hex_string(str, out, field_type);
|
||||
}
|
||||
@@ -410,7 +410,7 @@ size_t DbConnector::unescape_hex_char(const char * value_str, char * utf8_str, s
|
||||
|
||||
// CHECKME need to be tested
|
||||
// returns how many characters were used from value_str
|
||||
size_t DbConnector::unescape_hex_char(const char * value_str, wchar_t & field_value, FT field_type)
|
||||
size_t DbConnector::unescape_hex_char(const char * value_str, wchar_t & field_value, const FT & field_type)
|
||||
{
|
||||
size_t len = 0;
|
||||
|
||||
@@ -456,7 +456,7 @@ size_t DbConnector::unescape_hex_char(const char * value_str, wchar_t & field_va
|
||||
}
|
||||
|
||||
|
||||
size_t DbConnector::unescape_bin_char(const char * value_str, wchar_t & field_value, FT field_type)
|
||||
size_t DbConnector::unescape_bin_char(const char * value_str, wchar_t & field_value, const FT & field_type)
|
||||
{
|
||||
return unescape_hex_char(value_str, field_value, field_type);
|
||||
}
|
||||
@@ -464,7 +464,7 @@ size_t DbConnector::unescape_bin_char(const char * value_str, wchar_t & field_va
|
||||
|
||||
|
||||
// CHECKME need to be tested
|
||||
void DbConnector::get_value(const char * value_str, char & field_value, FT field_type)
|
||||
void DbConnector::get_value(const char * value_str, char & field_value, const FT & field_type)
|
||||
{
|
||||
wchar_t c;
|
||||
|
||||
@@ -495,7 +495,7 @@ void DbConnector::get_value(const char * value_str, char & field_value, FT field
|
||||
|
||||
|
||||
// CHECKME need to be tested
|
||||
void DbConnector::get_value(const char * value_str, unsigned char & field_value, FT field_type)
|
||||
void DbConnector::get_value(const char * value_str, unsigned char & field_value, const FT & field_type)
|
||||
{
|
||||
char tmp_char;
|
||||
get_value(value_str, tmp_char, field_type);
|
||||
@@ -506,7 +506,7 @@ void DbConnector::get_value(const char * value_str, unsigned char & field_value,
|
||||
|
||||
|
||||
// CHECKME need to be tested
|
||||
void DbConnector::get_value(const char * value_str, wchar_t & field_value, FT field_type)
|
||||
void DbConnector::get_value(const char * value_str, wchar_t & field_value, const FT & field_type)
|
||||
{
|
||||
field_value = 0;
|
||||
|
||||
@@ -547,7 +547,7 @@ void DbConnector::get_value(const char * value_str, wchar_t & field_value, FT fi
|
||||
|
||||
|
||||
// CHECKME need to be tested
|
||||
void DbConnector::get_value(const char * value_str, std::wstring & field_value, FT field_type)
|
||||
void DbConnector::get_value(const char * value_str, std::wstring & field_value, const FT & field_type)
|
||||
{
|
||||
if( field_type.is_binary() )
|
||||
{
|
||||
@@ -576,7 +576,7 @@ void DbConnector::get_value(const char * value_str, std::wstring & field_value,
|
||||
|
||||
|
||||
// CHECKME need to be tested
|
||||
void DbConnector::get_value(const char * value_str, std::string & field_value, FT field_type)
|
||||
void DbConnector::get_value(const char * value_str, std::string & field_value, const FT & field_type)
|
||||
{
|
||||
if( field_type.is_binary() )
|
||||
{
|
||||
@@ -594,7 +594,7 @@ void DbConnector::get_value(const char * value_str, std::string & field_value, F
|
||||
}
|
||||
|
||||
|
||||
void DbConnector::get_value(const char * value_str, bool & field_value, FT field_type)
|
||||
void DbConnector::get_value(const char * value_str, bool & field_value, const FT & field_type)
|
||||
{
|
||||
// IMPROVE ME
|
||||
// this 't' is locale dependent
|
||||
@@ -602,91 +602,91 @@ void DbConnector::get_value(const char * value_str, bool & field_value, FT field
|
||||
}
|
||||
|
||||
|
||||
void DbConnector::get_value(const char * value_str, short & field_value, FT field_type)
|
||||
void DbConnector::get_value(const char * value_str, short & field_value, const FT & field_type)
|
||||
{
|
||||
// IMPROVE ME give some overflow checking
|
||||
field_value = (short)PT::Toi(value_str, 10);
|
||||
}
|
||||
|
||||
|
||||
void DbConnector::get_value(const char * value_str, unsigned short & field_value, FT field_type)
|
||||
void DbConnector::get_value(const char * value_str, unsigned short & field_value, const FT & field_type)
|
||||
{
|
||||
// IMPROVE ME give some overflow checking
|
||||
field_value = (unsigned short)PT::Toui(value_str, 10);
|
||||
}
|
||||
|
||||
|
||||
void DbConnector::get_value(const char * value_str, int & field_value, FT field_type)
|
||||
void DbConnector::get_value(const char * value_str, int & field_value, const FT & field_type)
|
||||
{
|
||||
// IMPROVE ME give some overflow checking
|
||||
field_value = PT::Toi(value_str, 10);
|
||||
}
|
||||
|
||||
|
||||
void DbConnector::get_value(const char * value_str, unsigned int & field_value, FT field_type)
|
||||
void DbConnector::get_value(const char * value_str, unsigned int & field_value, const FT & field_type)
|
||||
{
|
||||
// IMPROVE ME give some overflow checking
|
||||
field_value = PT::Toui(value_str, 10);
|
||||
}
|
||||
|
||||
|
||||
void DbConnector::get_value(const char * value_str, long & field_value, FT field_type)
|
||||
void DbConnector::get_value(const char * value_str, long & field_value, const FT & field_type)
|
||||
{
|
||||
// IMPROVE ME give some overflow checking
|
||||
field_value = PT::Tol(value_str, 10);
|
||||
}
|
||||
|
||||
|
||||
void DbConnector::get_value(const char * value_str, unsigned long & field_value, FT field_type)
|
||||
void DbConnector::get_value(const char * value_str, unsigned long & field_value, const FT & field_type)
|
||||
{
|
||||
// IMPROVE ME give some overflow checking
|
||||
field_value = PT::Toul(value_str, 10);
|
||||
}
|
||||
|
||||
|
||||
void DbConnector::get_value(const char * value_str, long long & field_value, FT field_type)
|
||||
void DbConnector::get_value(const char * value_str, long long & field_value, const FT & field_type)
|
||||
{
|
||||
// IMPROVE ME give some overflow checking
|
||||
field_value = PT::Toll(value_str, 10);
|
||||
}
|
||||
|
||||
|
||||
void DbConnector::get_value(const char * value_str, unsigned long long & field_value, FT field_type)
|
||||
void DbConnector::get_value(const char * value_str, unsigned long long & field_value, const FT & field_type)
|
||||
{
|
||||
// IMPROVE ME give some overflow checking
|
||||
field_value = PT::Toull(value_str, 10);
|
||||
}
|
||||
|
||||
|
||||
void DbConnector::get_value(const char * value_str, float & field_value, FT field_type)
|
||||
void DbConnector::get_value(const char * value_str, float & field_value, const FT & field_type)
|
||||
{
|
||||
// IMPROVE ME give some overflow checking
|
||||
field_value = strtof(value_str, 0);
|
||||
}
|
||||
|
||||
|
||||
void DbConnector::get_value(const char * value_str, double & field_value, FT field_type)
|
||||
void DbConnector::get_value(const char * value_str, double & field_value, const FT & field_type)
|
||||
{
|
||||
// IMPROVE ME give some overflow checking
|
||||
field_value = strtod(value_str, 0);
|
||||
}
|
||||
|
||||
|
||||
void DbConnector::get_value(const char * value_str, long double & field_value, FT field_type)
|
||||
void DbConnector::get_value(const char * value_str, long double & field_value, const FT & field_type)
|
||||
{
|
||||
// IMPROVE ME give some overflow checking
|
||||
field_value = strtold(value_str, 0);
|
||||
}
|
||||
|
||||
|
||||
void DbConnector::get_value(const char * value_str, PT::Date & field_value, FT field_type)
|
||||
void DbConnector::get_value(const char * value_str, PT::Date & field_value, const FT & field_type)
|
||||
{
|
||||
// IMPROVE ME give some log if parsing failed
|
||||
field_value.Parse(value_str);
|
||||
}
|
||||
|
||||
|
||||
void DbConnector::get_value(const char * value_str, PT::Space & field_value, FT field_type)
|
||||
void DbConnector::get_value(const char * value_str, PT::Space & field_value, const FT & field_type)
|
||||
{
|
||||
field_value.clear();
|
||||
|
||||
|
Reference in New Issue
Block a user