From 943857711bd67798f1ef953b8a429852c97dc38b Mon Sep 17 00:00:00 2001 From: Brian Silver Date: Tue, 5 May 2015 10:28:32 -0500 Subject: Swap arguments to extract API to match ecmd buffers Change-Id: I787daba83e3aba64e2f61d9ec8d5d4d92f31999a Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/17595 Tested-by: Jenkins Server Reviewed-by: Matt K. Light Reviewed-by: Alex Goryachev Reviewed-by: Thi N. Tran Reviewed-by: Brian Silver --- import/hwpf/fapi2/include/buffer.H | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'import/hwpf') diff --git a/import/hwpf/fapi2/include/buffer.H b/import/hwpf/fapi2/include/buffer.H index 2fc2438e..c6719f15 100644 --- a/import/hwpf/fapi2/include/buffer.H +++ b/import/hwpf/fapi2/include/buffer.H @@ -592,14 +592,14 @@ namespace fapi2 /// /// @brief Copy data from this buffer into an OT - /// @tparam TS Start bit to insert into (target start) - /// @tparam L Length of bits to insert /// @tparam SS Start bit in source + /// @tparam L Length of bits to insert + /// @tparam TS Start bit to insert into (target start) /// @tparam OT the type of the outgoing (target) /// @param[out] o_out OT to copy into - data is placed left aligned /// @return buffer& Useful for method chaining /// - template + template inline buffer& extract(OT& o_out) { // Extraction is just an insert into o_out @@ -614,14 +614,14 @@ namespace fapi2 /// @brief Copy data from this buffer into an OT /// @tparam OT the type of the outgoing (target) /// @param[out] o_out OT to copy into - data is placed left aligned - /// @param[in] Start bit to insert into (target start) - /// @param[in] Length of bits to insert /// @param[in] Start bit in source + /// @param[in] Length of bits to insert + /// @param[in] Start bit to insert into (target start) /// @return FAPI2_RC_SUCCESS if ok /// template - fapi2::ReturnCode extract(OT& o_out, const bits_type i_targetStart, - const bits_type i_len, const bits_type i_sourceStart) + fapi2::ReturnCode extract(OT& o_out, const bits_type i_sourceStart, + const bits_type i_len, const bits_type i_targetStart = 0) { // Extraction is just an insert into o_out @@ -646,7 +646,7 @@ namespace fapi2 template inline buffer& extractToRight(OT& o_out) { - extract::bit_length() - L, L, SS>(o_out); + extract::bit_length() - L>(o_out); return *this; } @@ -662,7 +662,7 @@ namespace fapi2 fapi2::ReturnCode extractToRight(OT& o_out, const bits_type i_sourceStart, const bits_type i_len) { - return extract(o_out, parameterTraits::bit_length() - i_len, i_len, i_sourceStart); + return extract(o_out, i_sourceStart, i_len, parameterTraits::bit_length() - i_len); } ///@} -- cgit v1.2.1