Skip to content

Commit

Permalink
Merge pull request #428 from mtconnect/reformat_last_changes_with_cla…
Browse files Browse the repository at this point in the history
…ngformat
  • Loading branch information
wsobel authored Mar 21, 2024
2 parents 01953d2 + ed73b73 commit 251af5f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
8 changes: 5 additions & 3 deletions src/mtconnect/buffer/checkpoint.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,15 @@ namespace mtconnect::buffer {
void updateDataItems(std::unordered_map<std::string, WeakDataItemPtr> &diMap)
{
auto iter = m_observations.begin();
while( iter != m_observations.end() )
while (iter != m_observations.end())
{
auto item = *iter;
if( item.second->isOrphan() ) {
if (item.second->isOrphan())
{
iter = m_observations.erase(iter);
}
else {
else
{
item.second->updateDataItem(diMap);
iter++;
}
Expand Down
10 changes: 5 additions & 5 deletions src/mtconnect/buffer/circular_buffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@

#include "checkpoint.hpp"
#include "mtconnect/config.hpp"
#include "mtconnect/entity/requirement.hpp"
#include "mtconnect/logging.hpp"
#include "mtconnect/observation/observation.hpp"
#include "mtconnect/utilities.hpp"
#include "mtconnect/logging.hpp"
#include "mtconnect/entity/requirement.hpp"


namespace mtconnect::buffer {
using SequenceNumber_t = uint64_t;
Expand Down Expand Up @@ -87,10 +86,11 @@ namespace mtconnect::buffer {
{
for (auto &o : m_slidingBuffer)
{
if( o->isOrphan() ) {
if (o->isOrphan())
{
continue;
}
o->updateDataItem(diMap);
o->updateDataItem(diMap);
}

// checkpoints will remove orphans from its observations
Expand Down
4 changes: 2 additions & 2 deletions src/mtconnect/configuration/agent_config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,14 +255,14 @@ namespace mtconnect {
if (std::filesystem::exists(tst, ec) && !ec)
{
LOG(debug) << "Found file '" << file << "' "
<< " in path " << path;
<< " in path " << path;
auto con {std::filesystem::canonical(tst)};
return con;
}
else
{
LOG(debug) << "Cannot find file '" << file << "' "
<< " in path " << path;
<< " in path " << path;
}
}

Expand Down
6 changes: 3 additions & 3 deletions test_package/agent_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1785,9 +1785,9 @@ TEST_F(AgentTest, should_handle_uuid_change)
ASSERT_XML_PATH_EQUAL(doc, "//m:Description@serialNumber", "XXXX-1234");
ASSERT_XML_PATH_EQUAL(doc, "//m:Description@station", "YYYY");
}
auto *pipe = static_cast<shdr::ShdrPipeline*>(m_agentTestHelper->m_adapter->getPipeline());

auto *pipe = static_cast<shdr::ShdrPipeline *>(m_agentTestHelper->m_adapter->getPipeline());

ASSERT_EQ("MK-1234", pipe->getDevice());

{
Expand Down

0 comments on commit 251af5f

Please sign in to comment.