Skip to content

Commit

Permalink
formatting post const review
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrush committed Nov 28, 2017
1 parent 2f9aefb commit 1d34648
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 37 deletions.
14 changes: 7 additions & 7 deletions src/libs/conduit/conduit_node.cpp
Expand Up @@ -1517,7 +1517,7 @@ Node::set(const std::vector<double> &data)

//---------------------------------------------------------------------------//
void
Node::set_int8_ptr(const int8 *data,
Node::set_int8_ptr(const int8 *data,
index_t num_elements,
index_t offset,
index_t stride,
Expand All @@ -1533,7 +1533,7 @@ Node::set_int8_ptr(const int8 *data,

//---------------------------------------------------------------------------//
void
Node::set(const int8 *data,
Node::set(const int8 *data,
index_t num_elements,
index_t offset,
index_t stride,
Expand All @@ -1545,7 +1545,7 @@ Node::set(const int8 *data,

//---------------------------------------------------------------------------//
void
Node::set_int16_ptr(const int16 *data,
Node::set_int16_ptr(const int16 *data,
index_t num_elements,
index_t offset,
index_t stride,
Expand All @@ -1561,7 +1561,7 @@ Node::set_int16_ptr(const int16 *data,

//---------------------------------------------------------------------------//
void
Node::set(const int16 *data,
Node::set(const int16 *data,
index_t num_elements,
index_t offset,
index_t stride,
Expand Down Expand Up @@ -3011,7 +3011,7 @@ Node::set_path(const std::string &path,
//---------------------------------------------------------------------------//
void
Node::set_path_int8_ptr(const std::string &path,
const int8 *data,
const int8 *data,
index_t num_elements,
index_t offset,
index_t stride,
Expand All @@ -3029,7 +3029,7 @@ Node::set_path_int8_ptr(const std::string &path,
//---------------------------------------------------------------------------//
void
Node::set_path(const std::string &path,
const int8 *data,
const int8 *data,
index_t num_elements,
index_t offset,
index_t stride,
Expand Down Expand Up @@ -3163,7 +3163,7 @@ Node::set_path(const std::string &path,
//---------------------------------------------------------------------------//
void
Node::set_path(const std::string &path,
const uint8 *data,
const uint8 *data,
index_t num_elements,
index_t offset,
index_t stride,
Expand Down
57 changes: 27 additions & 30 deletions src/libs/conduit/conduit_node.hpp
Expand Up @@ -446,7 +446,6 @@ class CONDUIT_API Node

//-----------------------------------------------------------------------------
// -- set for bitwidth style std::vector types ---
// TODO IMP: move std::vector cases
//-----------------------------------------------------------------------------
//-------------------------------------------------------------------------
// signed integer array types via std::vector
Expand Down Expand Up @@ -532,14 +531,14 @@ class CONDUIT_API Node
//-------------------------------------------------------------------------
// signed integer pointer cases
//-------------------------------------------------------------------------
void set_int8_ptr(const int8 *data,
void set_int8_ptr(const int8 *data,
index_t num_elements = 1,
index_t offset = 0,
index_t stride = sizeof(conduit::int8),
index_t element_bytes = sizeof(conduit::int8),
index_t endianness = Endianness::DEFAULT_ID);

void set(const int8 *data,
void set(const int8 *data,
index_t num_elements = 1,
index_t offset = 0,
index_t stride = sizeof(conduit::int8),
Expand Down Expand Up @@ -595,14 +594,14 @@ class CONDUIT_API Node
//-------------------------------------------------------------------------
// unsigned integer pointer cases
//-------------------------------------------------------------------------
void set_uint8_ptr(const uint8 *data,
void set_uint8_ptr(const uint8 *data,
index_t num_elements = 1,
index_t offset = 0,
index_t stride = sizeof(conduit::uint8),
index_t element_bytes = sizeof(conduit::uint8),
index_t endianness = Endianness::DEFAULT_ID);

void set(const uint8 *data,
void set(const uint8 *data,
index_t num_elements = 1,
index_t offset = 0,
index_t stride = sizeof(conduit::uint8),
Expand All @@ -625,14 +624,14 @@ class CONDUIT_API Node
index_t endianness = Endianness::DEFAULT_ID);

//-------------------------------------------------------------------------
void set_uint32_ptr(const uint32 *data,
void set_uint32_ptr(const uint32 *data,
index_t num_elements = 1,
index_t offset = 0,
index_t stride = sizeof(conduit::uint32),
index_t element_bytes = sizeof(conduit::uint32),
index_t endianness = Endianness::DEFAULT_ID);

void set(const uint32 *data,
void set(const uint32 *data,
index_t num_elements = 1,
index_t offset = 0,
index_t stride = sizeof(conduit::uint32),
Expand Down Expand Up @@ -672,14 +671,14 @@ class CONDUIT_API Node
index_t endianness = Endianness::DEFAULT_ID);

//-------------------------------------------------------------------------
void set_float64_ptr(const float64 *data,
void set_float64_ptr(const float64 *data,
index_t num_elements = 1,
index_t offset = 0,
index_t stride = sizeof(conduit::float64),
index_t element_bytes = sizeof(conduit::float64),
index_t endianness = Endianness::DEFAULT_ID);

void set(const float64 *data,
void set(const float64 *data,
index_t num_elements = 1,
index_t offset = 0,
index_t stride = sizeof(conduit::float64),
Expand Down Expand Up @@ -923,7 +922,7 @@ class CONDUIT_API Node
void set_path_int8_array(const std::string &path,
const int8_array &data);

void set_path(const std::string &path, const int8_array &data);
void set_path(const std::string &path, const int8_array &data);

//-------------------------------------------------------------------------
void set_path_int16_array(const std::string &path,
Expand Down Expand Up @@ -1170,15 +1169,15 @@ class CONDUIT_API Node
// signed integer pointer cases
//-------------------------------------------------------------------------
void set_path_int8_ptr(const std::string &path,
const int8 *data,
const int8 *data,
index_t num_elements = 1,
index_t offset = 0,
index_t stride = sizeof(conduit::int8),
index_t element_bytes = sizeof(conduit::int8),
index_t endianness = Endianness::DEFAULT_ID);

void set_path(const std::string &path,
const int8 *data,
const int8 *data,
index_t num_elements = 1,
index_t offset = 0,
index_t stride = sizeof(conduit::int8),
Expand Down Expand Up @@ -1274,15 +1273,15 @@ class CONDUIT_API Node

//-------------------------------------------------------------------------
void set_path_uint32_ptr(const std::string &path,
const uint32 *data,
const uint32 *data,
index_t num_elements = 1,
index_t offset = 0,
index_t stride = sizeof(conduit::uint32),
index_t element_bytes = sizeof(conduit::uint32),
index_t endianness = Endianness::DEFAULT_ID);

void set_path(const std::string &path,
const uint32 *data,
const uint32 *data,
index_t num_elements = 1,
index_t offset = 0,
index_t stride = sizeof(conduit::uint32),
Expand Down Expand Up @@ -1335,7 +1334,7 @@ class CONDUIT_API Node
index_t endianness = Endianness::DEFAULT_ID);

void set_path(const std::string &path,
const float64 *data,
const float64 *data,
index_t num_elements = 1,
index_t offset = 0,
index_t stride = sizeof(conduit::float64),
Expand Down Expand Up @@ -1950,15 +1949,15 @@ class CONDUIT_API Node
// signed integer pointer cases
//-------------------------------------------------------------------------
void set_path_external_int8_ptr(const std::string &path,
int8 *data,
int8 *data,
index_t num_elements = 1,
index_t offset = 0,
index_t stride = sizeof(conduit::int8),
index_t element_bytes = sizeof(conduit::int8),
index_t endianness = Endianness::DEFAULT_ID);

void set_path_external(const std::string &path,
int8 *data,
int8 *data,
index_t num_elements = 1,
index_t offset = 0,
index_t stride = sizeof(conduit::int8),
Expand Down Expand Up @@ -2230,7 +2229,7 @@ class CONDUIT_API Node
const int8_array &data);

void set_path_external(const std::string &path,
const int8_array &data);
const int8_array &data);

//-------------------------------------------------------------------------
void set_path_external_int16_array(const std::string &path,
Expand Down Expand Up @@ -2503,7 +2502,7 @@ class CONDUIT_API Node
//-----------------------------------------------------------------------------
Node &operator=(const Node &node);
Node &operator=(const DataType &dtype);
Node &operator=(const Schema &schema);
Node &operator=(const Schema &schema);

//-----------------------------------------------------------------------------
// -- assignment operators for scalar types ---
Expand Down Expand Up @@ -2711,8 +2710,6 @@ class CONDUIT_API Node
/// update() adds children from n_src to current Node (analogous to a
/// python dictionary update)
///
/// NOTE: The input should be const, but the lack of a const fetch prevents
/// this for now.
void update(const Node &n_src);

/// update_compatible() copies data from the children in n_src that match
Expand Down Expand Up @@ -2827,7 +2824,7 @@ class CONDUIT_API Node
// -- Node::Value Helper class --
//
// This class allows us to support casting return semantics.
// we can't support these methods directly in conduit::Node because doing so
// we can't support these methods directly in conduit::Node because doing so
// undermines our operator=() overloads.
//-----------------------------------------------------------------------------
class CONDUIT_API Value
Expand Down Expand Up @@ -3115,9 +3112,9 @@ class CONDUIT_API Node
//-----------------------------------------------------------------------------
// schema access
const Schema &schema() const
{ return *m_schema;}
{ return *m_schema;}

const DataType &dtype() const
const DataType &dtype() const
{ return m_schema->dtype();}

Schema *schema_ptr()
Expand All @@ -3129,7 +3126,7 @@ class CONDUIT_API Node
{return !m_alloced;}

// check if this node is the root of a tree nodes.
bool is_root() const
bool is_root() const
{return m_parent == NULL;}

// parent access
Expand All @@ -3143,7 +3140,7 @@ class CONDUIT_API Node

/// stride() * (num_elements()-1) + element_bytes() summed over all
/// leaves
index_t total_strided_bytes() const
index_t total_strided_bytes() const
{ return m_schema->total_strided_bytes();}

/// num_elements() * element_bytes() summed over all leaves
Expand Down Expand Up @@ -3790,15 +3787,15 @@ class CONDUIT_API Node
//-------------------------------------------------------------------------
// the generic to_json methods are used by the specialized cases
//-------------------------------------------------------------------------
std::string to_json_generic(bool detailed,
index_t indent=2,
std::string to_json_generic(bool detailed,
index_t indent=2,
index_t depth=0,
const std::string &pad=" ",
const std::string &eoe="\n") const;

void to_json_generic(const std::string &stream_path,
bool detailed,
index_t indent=2,
bool detailed,
index_t indent=2,
index_t depth=0,
const std::string &pad=" ",
const std::string &eoe="\n") const;
Expand Down

0 comments on commit 1d34648

Please sign in to comment.