diff --git a/src/usr/diag/prdf/common/framework/register/prdfOperatorRegister.H b/src/usr/diag/prdf/common/framework/register/prdfOperatorRegister.H index edfc46a3046..c35425bac63 100755 --- a/src/usr/diag/prdf/common/framework/register/prdfOperatorRegister.H +++ b/src/usr/diag/prdf/common/framework/register/prdfOperatorRegister.H @@ -641,7 +641,7 @@ class ConstantRegister : public SCAN_COMM_REGISTER_CLASS SCAN_COMM_REGISTER_CLASS( ), iv_iBS(0) {} - ConstantRegister(BIT_STRING_CLASS i_arg) : + ConstantRegister( const BitStringBuffer & i_arg ) : SCAN_COMM_REGISTER_CLASS( ), iv_iBS(i_arg) {} diff --git a/src/usr/diag/prdf/common/framework/register/prdfScanFacility.C b/src/usr/diag/prdf/common/framework/register/prdfScanFacility.C index 7737433b092..6c46dea931b 100755 --- a/src/usr/diag/prdf/common/framework/register/prdfScanFacility.C +++ b/src/usr/diag/prdf/common/framework/register/prdfScanFacility.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2016 */ +/* Contributors Listed Below - COPYRIGHT 2012,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -166,8 +166,8 @@ SCAN_COMM_REGISTER_CLASS & ScanFacility::GetAttnTypeRegister( //------------------------------------------------------------------------------ -SCAN_COMM_REGISTER_CLASS & ScanFacility::GetConstantRegister( - BIT_STRING_CLASS i_val ) +SCAN_COMM_REGISTER_CLASS & ScanFacility::GetConstantRegister( + const BitStringBuffer & i_val ) { ConstantRegister r(i_val); return iv_constRegFw.get(r); diff --git a/src/usr/diag/prdf/common/framework/register/prdfScanFacility.H b/src/usr/diag/prdf/common/framework/register/prdfScanFacility.H index be52a8124dc..f9ee286d661 100755 --- a/src/usr/diag/prdf/common/framework/register/prdfScanFacility.H +++ b/src/usr/diag/prdf/common/framework/register/prdfScanFacility.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2016 */ +/* Contributors Listed Below - COPYRIGHT 2012,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -153,7 +153,7 @@ public: * @post only one instance of the register with this BIT_STRING value will * exist. */ - SCAN_COMM_REGISTER_CLASS & GetConstantRegister(BIT_STRING_CLASS i_val); + SCAN_COMM_REGISTER_CLASS & GetConstantRegister(const BitStringBuffer & i_val); /** * @brief Get a plugin register * @param Reference to target less flyweight object diff --git a/src/usr/diag/prdf/common/util/prdfBitString.H b/src/usr/diag/prdf/common/util/prdfBitString.H index 3e111188279..028eb915c40 100755 --- a/src/usr/diag/prdf/common/util/prdfBitString.H +++ b/src/usr/diag/prdf/common/util/prdfBitString.H @@ -375,14 +375,16 @@ class BitString /** @param i_newBitLen The new bit length of this bit string buffer. */ void setBitLen( uint32_t i_newBitLen ) { iv_bitLen = i_newBitLen; } - /*! - Assignment operator - \param string Reference bit string - */ - virtual BitString & operator=(const BitString & string); - private: // functions + // Prevent the assignment operator and copy constructor from a + // BitStringBuffer. While technically these could be done. We run into + // serious problems like with the operator functions above that all return + // a BitStringBuffer. If we allowed these, the BitString would end up + // pointing to memory that is no longer in context. + BitString & operator=( const BitStringBuffer & i_bsb ); + BitString( const BitStringBuffer & i_bsb ); + /** * @brief Given a bit position within the bit string, this function returns * the address that contains the bit position and the bit position @@ -456,17 +458,6 @@ std::ostream & operator<<( std::ostream & out, #endif -inline -BitString & BitString::operator= -( - const BitString & string - ) -{ - iv_bitLen = string.iv_bitLen; - iv_bufAddr = string.iv_bufAddr; - return(*this); -} - } // end namespace PRDF #endif