summaryrefslogtreecommitdiffstats
path: root/import/hwpf/fapi2/include
diff options
context:
space:
mode:
authorBrian Silver <bsilver@us.ibm.com>2015-04-01 13:40:48 -0500
committerJoshua Hunsberger <jahunsbe@us.ibm.com>2017-10-23 15:50:59 -0500
commit6dc513976e3d3f7e8c83b0d2f234ca5349a03370 (patch)
tree1a72c1a12a85e5828a73952a523386c4bebabb94 /import/hwpf/fapi2/include
parent99fe5ac5c1af57e337b26859a725cde9ae299b3c (diff)
downloadtalos-hcode-6dc513976e3d3f7e8c83b0d2f234ca5349a03370.tar.gz
talos-hcode-6dc513976e3d3f7e8c83b0d2f234ca5349a03370.zip
Add variable_buffer::pointer()
Change-Id: I4018509b00898c6ce9706c62d2d956a1019126aa Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/16819 Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-by: PRACHI GUPTA <pragupta@us.ibm.com> Reviewed-by: STEPHEN M. CPREK <smcprek@us.ibm.com> Reviewed-by: Brian Silver <bsilver@us.ibm.com> Tested-by: Brian Silver <bsilver@us.ibm.com>
Diffstat (limited to 'import/hwpf/fapi2/include')
-rw-r--r--import/hwpf/fapi2/include/buffer.H6
-rw-r--r--import/hwpf/fapi2/include/buffer_parameters.H2
2 files changed, 7 insertions, 1 deletions
diff --git a/import/hwpf/fapi2/include/buffer.H b/import/hwpf/fapi2/include/buffer.H
index 7e3d70a6..f7a7cf4c 100644
--- a/import/hwpf/fapi2/include/buffer.H
+++ b/import/hwpf/fapi2/include/buffer.H
@@ -236,6 +236,12 @@ namespace fapi2
/// @name Buffer Manipulation Functions
///@{
+ ///
+ /// @brief Get a pointer to the buffer bits
+ /// @return Pointer to the buffer itself
+ ///
+ inline T* pointer(void) { return &this->iv_data; }
+
// Note: Many (all?) of these are not needed and the compiler complains
// as the cast to T yields a better operator. There are here mainly for
// documenation purposes.
diff --git a/import/hwpf/fapi2/include/buffer_parameters.H b/import/hwpf/fapi2/include/buffer_parameters.H
index 49d5444d..b5717188 100644
--- a/import/hwpf/fapi2/include/buffer_parameters.H
+++ b/import/hwpf/fapi2/include/buffer_parameters.H
@@ -44,7 +44,7 @@ namespace fapi2
// Why constexpr functions? Enums are hard to do math on, and
// static const doesn't work without -O1 (or greater.) That might
// be a bug in g++ but this works just the same.
- constexpr static uint32_t mask(void)
+ constexpr static T mask(void)
{ return T(~0); }
constexpr static uint32_t byte_length(void)
OpenPOWER on IntegriCloud