Skip to content

Commit

Permalink
iox-eclipse-iceoryx#65 Clang format.
Browse files Browse the repository at this point in the history
Signed-off-by: Ithier Jeff (CC-AD/EYF1) <[email protected]>
  • Loading branch information
orecham committed Jul 6, 2020
1 parent 11ce23b commit b6dab41
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
1 change: 0 additions & 1 deletion iceoryx_dds/include/iceoryx_dds/dds/cyclone_context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ namespace iox
{
namespace dds
{

///
/// @brief The CycloneContext manages cyclone configurations and singleton artifacts shared throughout an application.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ namespace iox
{
namespace dds
{

enum TomlGatewayConfigParseError
{
FILE_NOT_FOUND,
Expand All @@ -36,10 +35,8 @@ enum TomlGatewayConfigParseError
};

constexpr int32_t MAX_ENUM_STRING_SIZE = 64;
constexpr char TomlGatewayConfigParseErrorString[][MAX_ENUM_STRING_SIZE] = {"FILE_NOT_FOUND",
"INCOMPLETE_CONFIGURATION",
"INCOMPLETE_SERVICE_DESCRIPTION",
"INVALID_SERVICE_DESCRIPTION"};
constexpr char TomlGatewayConfigParseErrorString[][MAX_ENUM_STRING_SIZE] = {
"FILE_NOT_FOUND", "INCOMPLETE_CONFIGURATION", "INCOMPLETE_SERVICE_DESCRIPTION", "INVALID_SERVICE_DESCRIPTION"};

static constexpr const char REGEX_VALID_CHARACTERS[] = "^[a-zA-Z_][a-zA-Z0-9_]*$";

Expand Down
5 changes: 3 additions & 2 deletions iceoryx_dds/source/dds2iceoryx_app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

#include "iceoryx_dds/dds/data_reader.hpp"

#include "iceoryx_dds/internal/log/logging.hpp"
#include "iceoryx_dds/gateway/dds_to_iox.hpp"
#include "iceoryx_dds/gateway/toml_gateway_config_parser.hpp"
#include "iceoryx_dds/internal/log/logging.hpp"
#include "iceoryx_posh/runtime/posh_runtime.hpp"
#include "iceoryx_utils/posix_wrapper/semaphore.hpp"

Expand Down Expand Up @@ -68,7 +68,8 @@ int main(int argc, char* argv[])
}
else
{
iox::dds::LogWarn() << "[Main] Failed to parse gateway config with error: " << iox::dds::TomlGatewayConfigParseErrorString[result.get_error()];
iox::dds::LogWarn() << "[Main] Failed to parse gateway config with error: "
<< iox::dds::TomlGatewayConfigParseErrorString[result.get_error()];
iox::dds::LogWarn() << "[Main] Using default configuration.";
iox::dds::GatewayConfig defaultConfig;
defaultConfig.setDefaults();
Expand Down
3 changes: 2 additions & 1 deletion iceoryx_dds/source/iceoryx2dds_app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ int main(int argc, char* argv[])
}
else
{
iox::dds::LogWarn() << "[Main] Failed to parse gateway config with error: " << iox::dds::TomlGatewayConfigParseErrorString[result.get_error()];
iox::dds::LogWarn() << "[Main] Failed to parse gateway config with error: "
<< iox::dds::TomlGatewayConfigParseErrorString[result.get_error()];
iox::dds::LogWarn() << "[Main] Using default configuration.";
iox::dds::GatewayConfig defaultConfig;
defaultConfig.setDefaults();
Expand Down
5 changes: 4 additions & 1 deletion iceoryx_dds/source/iceoryx_dds/dds/cyclone_data_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ iox::cxx::expected<uint64_t, iox::dds::DataReaderError> iox::dds::CycloneDataRea
}

// Read up to the maximum number of samples that can fit in the buffer.
auto samples = m_impl.select().max_samples(static_cast<uint32_t>(maxSamples)).state(::dds::sub::status::SampleState::not_read()).take();
auto samples = m_impl.select()
.max_samples(static_cast<uint32_t>(maxSamples))
.state(::dds::sub::status::SampleState::not_read())
.take();

// Copy data into the provided buffer.
uint64_t numSamplesBuffered = 0u;
Expand Down

0 comments on commit b6dab41

Please sign in to comment.