Default constructor for template class should be part of header file

pull/6442/head
Deepika 2018-03-23 14:55:07 -05:00
parent bf0393aaa9
commit 331620e1d0
2 changed files with 6 additions and 8 deletions

View File

@ -24,13 +24,6 @@ namespace mbed {
/* Default values for different types of polynomials
*/
template <uint32_t polynomial, uint8_t width>
MbedCRC<polynomial, width>::MbedCRC(uint32_t initial_xor, uint32_t final_xor, bool reflect_data, bool reflect_remainder):
_initial_value(initial_xor), _final_xor(final_xor), _reflect_data(reflect_data), _reflect_remainder(reflect_remainder), _crc_table(NULL)
{
mbed_crc_ctor();
}
template<>
MbedCRC<POLY_32BIT_ANSI, 32>::MbedCRC(uint32_t initial_xor, uint32_t final_xor, bool reflect_data, bool reflect_remainder):
_initial_value(initial_xor), _final_xor(final_xor), _reflect_data(reflect_data), _reflect_remainder(reflect_remainder),

View File

@ -124,7 +124,12 @@ public:
* polynomials with different intial/final/reflect values
*
*/
MbedCRC(uint32_t initial_xor, uint32_t final_xor, bool reflect_data, bool reflect_remainder);
MbedCRC(uint32_t initial_xor, uint32_t final_xor, bool reflect_data, bool reflect_remainder) :
_initial_value(initial_xor), _final_xor(final_xor), _reflect_data(reflect_data),
_reflect_remainder(reflect_remainder), _crc_table(NULL)
{
mbed_crc_ctor();
}
MbedCRC();
virtual ~MbedCRC()
{