Skip to content

Commit

Permalink
Apply new clang-format-18 rules
Browse files Browse the repository at this point in the history
As discussed in AliceO2Group#51
  • Loading branch information
singiamtel committed Nov 14, 2024
1 parent 53bae16 commit d5d29a3
Show file tree
Hide file tree
Showing 20 changed files with 8 additions and 28 deletions.
3 changes: 1 addition & 2 deletions src/Configuration.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void getValueSpecialization(void)
vString = f.getValue<std::string>(s);
}

//template void ConfigFile::getValue<float>(std::string, float&);
// template void ConfigFile::getValue<float>(std::string, float&);

// http://stackoverflow.com/questions/4586768/how-to-iterate-a-boost-property-tree
string indent(int level)
Expand Down Expand Up @@ -223,4 +223,3 @@ ConfigFileBrowser::Iterator ConfigFileBrowser::end()
{
return Iterator(this, ptPtr->end(), ptPtr->end());
}

1 change: 0 additions & 1 deletion src/Daemon.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -278,4 +278,3 @@ Daemon::LoopStatus Daemon::doLoop()

// todo
// boost exceptions?

1 change: 0 additions & 1 deletion src/Exception.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,3 @@ const char* Exception::what() const noexcept

} // namespace Common
} // namespace AliceO2

1 change: 0 additions & 1 deletion src/Iommu.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,3 @@ bool isEnabled()
} // namespace Iommu
} // namespace Common
} // namespace AliceO2

3 changes: 1 addition & 2 deletions src/LineBuffer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,4 @@ int LineBuffer::getNextLine(std::string& nextLine)
return 0;
}

//void LineBuffer::appendString(const char *s) {}

// void LineBuffer::appendString(const char *s) {}
5 changes: 2 additions & 3 deletions src/MemPool.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void* MemPool::getPage()
int newIx = (lastPageIndexGet + 1 + i) % numberOfPages;
if (!pageIsUsed[newIx].test_and_set()) {
lastPageIndexGet = newIx;
//printf("getPage() scan => %d\n",j);
// printf("getPage() scan => %d\n",j);
return pageTable[newIx];
}
j++;
Expand All @@ -109,7 +109,7 @@ void MemPool::releasePage(void* pagePtr)
if (pagePtr == pageTable[pageIx]) {
pageIsUsed[pageIx].clear();
lastPageIndexRelease = pageIx;
//printf("realeasePage() scan => %d\n",j);
// printf("realeasePage() scan => %d\n",j);
return;
}
j++;
Expand All @@ -120,4 +120,3 @@ int MemPool::getPageSize()
{
return pageSize;
}

1 change: 0 additions & 1 deletion src/Program.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,3 @@ int Program::execute(int argc, char** argv)

} // namespace Common
} // namespace AliceO2

3 changes: 1 addition & 2 deletions src/SimpleLog.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ int SimpleLog::Impl::logV(SimpleLog::Impl::Severity s, const char* message, va_l
} else if (s == Severity::Warning) {
ix += snprintf(&buffer[ix], len - ix, "Warning - ");
} else {
//ix+=snprintf(&buffer[ix], len-ix, "");
// ix+=snprintf(&buffer[ix], len-ix, "");
}
}

Expand Down Expand Up @@ -410,4 +410,3 @@ void SimpleLog::Impl::rotate()
}

/// \todo: thread to flush output every 1 second

1 change: 0 additions & 1 deletion src/SuffixNumber.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,3 @@ const std::vector<std::pair<std::string, const size_t>>& get()
} // namespace _SuffixNumberTable
} // namespace Common
} // namespace AliceO2

1 change: 0 additions & 1 deletion src/System.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,3 @@ void assertFileSystemType(const std::string& path, const std::set<std::string>&
} // namespace System
} // namespace Common
} // namespace AliceO2

1 change: 0 additions & 1 deletion src/Thread.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,3 @@ std::string Thread::getName()
{
return name;
}

1 change: 0 additions & 1 deletion test/TestBasicThread.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ BOOST_AUTO_TEST_CASE(TestBasicThread)
thread.join();
BOOST_CHECK(number > 0);
}

1 change: 0 additions & 1 deletion test/TestIommu.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ BOOST_AUTO_TEST_CASE(TestIsEnabled)
{
BOOST_CHECK_NO_THROW(AliceO2::Common::Iommu::isEnabled());
}

1 change: 0 additions & 1 deletion test/TestSuffixNumber.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,3 @@ BOOST_AUTO_TEST_CASE(TestFloatingPoint)
sn.setNumber("-123");
BOOST_CHECK_EQUAL(sn.getNumber(), -123);
}

1 change: 0 additions & 1 deletion test/TestSuffixOption.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,3 @@ BOOST_AUTO_TEST_CASE(TestSuffixOption)
BOOST_CHECK(numberB.getNumber() == 123);
BOOST_CHECK(numberC == -1000.0);
}

1 change: 0 additions & 1 deletion test/TestSystem.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,3 @@ BOOST_AUTO_TEST_CASE(TestIsFileSystemTypeAnyOf)
BOOST_CHECK(System::isFileSystemTypeAnyOf("/sys", { "blahfs", "ext42" }).first == false);
#endif
}

1 change: 0 additions & 1 deletion test/testDaemon.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ int main(int argc, char* argv[])
Daemon d(argc, argv);
return d.run();
}

1 change: 0 additions & 1 deletion test/testFifo.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,3 @@ BOOST_AUTO_TEST_CASE(fifo_test)

printf("fifoSz=%d sum=%d\n", fifoSz, sum2);
}

7 changes: 3 additions & 4 deletions test/testSimpleLog.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ int main()

SimpleLog theLog;
theLog.setLogFile("/tmp/test.log", 100, 4, 0);
for (int i=0; i<10; i++) {
theLog.info("test message %d",i);
for (int i = 0; i < 10; i++) {
theLog.info("test message %d", i);
}
//sleep(10);
// sleep(10);
return 0;
}

1 change: 0 additions & 1 deletion test/testTimer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,3 @@ BOOST_AUTO_TEST_CASE(timer_test)

BOOST_CHECK_EQUAL(success, 1);
}

0 comments on commit d5d29a3

Please sign in to comment.