sc_int_base.cc (13322:7391057615bd) | sc_int_base.cc (13325:86323e6cc8ec) |
---|---|
1/***************************************************************************** 2 3 Licensed to Accellera Systems Initiative Inc. (Accellera) under one or 4 more contributor license agreements. See the NOTICE file distributed 5 with this work for additional information regarding copyright ownership. 6 Accellera licenses this file to you under the Apache License, Version 2.0 7 (the "License"); you may not use this file except in compliance with the 8 License. You may obtain a copy of the License at --- 503 unchanged lines hidden (view full) --- 512 extend_sign(); 513 return *this; 514} 515 516sc_int_base & 517sc_int_base::operator = (const char *a) 518{ 519 if (a == 0) { | 1/***************************************************************************** 2 3 Licensed to Accellera Systems Initiative Inc. (Accellera) under one or 4 more contributor license agreements. See the NOTICE file distributed 5 with this work for additional information regarding copyright ownership. 6 Accellera licenses this file to you under the Apache License, Version 2.0 7 (the "License"); you may not use this file except in compliance with the 8 License. You may obtain a copy of the License at --- 503 unchanged lines hidden (view full) --- 512 extend_sign(); 513 return *this; 514} 515 516sc_int_base & 517sc_int_base::operator = (const char *a) 518{ 519 if (a == 0) { |
520 SC_REPORT_ERROR("conversion failed", | 520 SC_REPORT_ERROR(sc_core::SC_ID_CONVERSION_FAILED_, |
521 "character string is zero"); 522 } else if (*a == 0) { | 521 "character string is zero"); 522 } else if (*a == 0) { |
523 SC_REPORT_ERROR("conversion failed", | 523 SC_REPORT_ERROR(sc_core::SC_ID_CONVERSION_FAILED_, |
524 "character string is empty"); 525 } else try { 526 int len = m_len; 527 sc_fix aa(a, len, len, SC_TRN, SC_WRAP, 0, SC_ON); 528 return this->operator = (aa); 529 } catch(const sc_core::sc_report &) { 530 std::stringstream msg; 531 msg << "character string '" << a << "' is not valid"; | 524 "character string is empty"); 525 } else try { 526 int len = m_len; 527 sc_fix aa(a, len, len, SC_TRN, SC_WRAP, 0, SC_ON); 528 return this->operator = (aa); 529 } catch(const sc_core::sc_report &) { 530 std::stringstream msg; 531 msg << "character string '" << a << "' is not valid"; |
532 SC_REPORT_ERROR("conversion failed", msg.str().c_str()); | 532 SC_REPORT_ERROR(sc_core::SC_ID_CONVERSION_FAILED_, msg.str().c_str()); |
533 } 534 return *this; 535} 536 537// explicit conversion to character string 538const std::string 539sc_int_base::to_string(sc_numrep numrep) const 540{ --- 167 unchanged lines hidden --- | 533 } 534 return *this; 535} 536 537// explicit conversion to character string 538const std::string 539sc_int_base::to_string(sc_numrep numrep) const 540{ --- 167 unchanged lines hidden --- |