Skip to content
Snippets Groups Projects
Commit 25756dec authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Autoformatting

parent 6fc0f91b
No related branches found
No related tags found
2 merge requests!140armem/dev -> master,!136Memory structure changes, query_proc structure changes (Base classes / templated)
...@@ -24,7 +24,7 @@ namespace armarx ...@@ -24,7 +24,7 @@ namespace armarx
SensorHeader fromAron(const arondto::SensorHeader& aronSensorHeader) SensorHeader fromAron(const arondto::SensorHeader& aronSensorHeader)
{ {
return {.agent = aronSensorHeader.agent, return {.agent = aronSensorHeader.agent,
.frame = aronSensorHeader.frame, .frame = aronSensorHeader.frame,
.timestamp = timeFromAron(aronSensorHeader.timestamp)}; .timestamp = timeFromAron(aronSensorHeader.timestamp)};
......
...@@ -33,12 +33,12 @@ namespace armarx::aron ...@@ -33,12 +33,12 @@ namespace armarx::aron
* You have to provide a converter function for the element with the signature * You have to provide a converter function for the element with the signature
* *
* PlainCppType fromAron(const AronType&) * PlainCppType fromAron(const AronType&)
* *
* @tparam T the aron vector element * @tparam T the aron vector element
* @param v the vector of elements * @param v the vector of elements
* @return the vector of aron elements * @return the vector of aron elements
*/ */
template <typename T> template <typename T>
auto fromAron(const std::vector<T>& v) -> std::vector<decltype(fromAron(T()))> auto fromAron(const std::vector<T>& v) -> std::vector<decltype(fromAron(T()))>
{ {
std::vector<decltype(fromAron(T()))> r; std::vector<decltype(fromAron(T()))> r;
......
...@@ -39,7 +39,7 @@ namespace armarx::aron::converter ...@@ -39,7 +39,7 @@ namespace armarx::aron::converter
{ {
public: public:
AronVectorConverter() = delete; AronVectorConverter() = delete;
template<typename T> template<typename T>
static std::vector<T> ConvertToVector(const datanavigator::NDArrayNavigatorPtr& nav) static std::vector<T> ConvertToVector(const datanavigator::NDArrayNavigatorPtr& nav)
{ {
...@@ -47,16 +47,16 @@ namespace armarx::aron::converter ...@@ -47,16 +47,16 @@ namespace armarx::aron::converter
const auto& dims = nav->getDimensions(); const auto& dims = nav->getDimensions();
if(dims.size() != 2) if (dims.size() != 2)
{ {
throw error::AronException("AronVectorConverter", "ConvertToVector", "The NDArray must have two dimensions.", nav->getPath()); throw error::AronException("AronVectorConverter", "ConvertToVector", "The NDArray must have two dimensions.", nav->getPath());
} }
if(dims.at(1) != sizeof(T)) if (dims.at(1) != sizeof(T))
{ {
throw error::AronException("AronVectorConverter", "ConvertToVector", "Dimension 1 of the array has to match the element size.", nav->getPath()); throw error::AronException("AronVectorConverter", "ConvertToVector", "Dimension 1 of the array has to match the element size.", nav->getPath());
} }
const int size = std::accumulate(std::begin(dims), std::end(dims), 1, std::multiplies<>()); const int size = std::accumulate(std::begin(dims), std::end(dims), 1, std::multiplies<>());
std::vector<T> v(dims.at(0)); std::vector<T> v(dims.at(0));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment