Skip to content

Commit

Permalink
Change UseTab to ForIndentation (#1466)
Browse files Browse the repository at this point in the history
  • Loading branch information
seladb authored Jun 24, 2024
1 parent 47e25d4 commit fcf7e7a
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
BasedOnStyle: Microsoft
UseTab: AlignWithSpaces
UseTab: ForIndentation
AllowShortFunctionsOnASingleLine: None
NamespaceIndentation: All
SortIncludes: false
Expand Down
2 changes: 1 addition & 1 deletion Common++/header/LRUList.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespace pcpp
// Inserting a new element. If an element with an equivalent key already exists the method returns an
// iterator to the element that prevented the insertion
std::pair<MapIterator, bool> pair =
m_CacheItemsMap.insert(std::make_pair(element, m_CacheItemsList.begin()));
m_CacheItemsMap.insert(std::make_pair(element, m_CacheItemsList.begin()));
if (pair.second == false) // already exists
{
m_CacheItemsList.erase(pair.first->second);
Expand Down
4 changes: 2 additions & 2 deletions Common++/src/IpAddress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ namespace pcpp
if (netmaskStr.empty())
{
throw std::invalid_argument(
"The input should be in the format of <address>/<netmask> or <address>/<prefixLength>");
"The input should be in the format of <address>/<netmask> or <address>/<prefixLength>");
}

IPv4Address networkPrefix;
Expand Down Expand Up @@ -443,7 +443,7 @@ namespace pcpp
if (netmaskStr.empty())
{
throw std::invalid_argument(
"The input should be in the format of <address>/<netmask> or <address>/<prefixLength>");
"The input should be in the format of <address>/<netmask> or <address>/<prefixLength>");
}

IPv6Address networkPrefix;
Expand Down
2 changes: 1 addition & 1 deletion Common++/src/Logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace pcpp
std::ostringstream sstream;
sstream << file << ": " << method << ":" << line;
std::cout << std::left << "[" << std::setw(5) << Logger::logLevelAsString(logLevel) << ": " << std::setw(45)
<< sstream.str() << "] " << logMessage << std::endl;
<< sstream.str() << "] " << logMessage << std::endl;
}

std::ostringstream* Logger::internalCreateLogStream()
Expand Down
4 changes: 2 additions & 2 deletions Common++/src/OUILookup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace pcpp
if (subentry.value().is_string())
{
vLocalMaskedFilter.back().vendorMap.insert(
{ std::stoull(subentry.key()), subentry.value() });
{ std::stoull(subentry.key()), subentry.value() });
++ctrRead;
}
}
Expand All @@ -53,7 +53,7 @@ namespace pcpp
}

vendorMap.insert({
std::stoull(line.key()), { val["vendor"], vLocalMaskedFilter }
std::stoull(line.key()), { val["vendor"], vLocalMaskedFilter }
});
++ctrRead;
}
Expand Down
6 changes: 3 additions & 3 deletions Common++/src/SystemUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ namespace pcpp
{
if (ApplicationEventHandler::getInstance().m_ApplicationInterruptedHandler != NULL)
ApplicationEventHandler::getInstance().m_ApplicationInterruptedHandler(
ApplicationEventHandler::getInstance().m_ApplicationInterruptedCookie);
ApplicationEventHandler::getInstance().m_ApplicationInterruptedCookie);
return TRUE;
}

Expand All @@ -347,7 +347,7 @@ namespace pcpp

if (ApplicationEventHandler::getInstance().m_ApplicationInterruptedHandler != nullptr)
ApplicationEventHandler::getInstance().m_ApplicationInterruptedHandler(
ApplicationEventHandler::getInstance().m_ApplicationInterruptedCookie);
ApplicationEventHandler::getInstance().m_ApplicationInterruptedCookie);

ApplicationEventHandler::getInstance().m_ApplicationInterruptedHandler = nullptr;

Expand All @@ -362,7 +362,7 @@ namespace pcpp
#endif

ApplicationEventHandler::ApplicationEventHandler()
: m_ApplicationInterruptedHandler(nullptr), m_ApplicationInterruptedCookie(nullptr)
: m_ApplicationInterruptedHandler(nullptr), m_ApplicationInterruptedCookie(nullptr)
{}

void ApplicationEventHandler::onApplicationInterrupted(EventHandlerCallback handler, void* cookie)
Expand Down
4 changes: 2 additions & 2 deletions Common++/src/TablePrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ namespace pcpp
{

TablePrinter::TablePrinter(std::vector<std::string> columnNames, std::vector<int> columnWidths)
: m_ColumnNames(std::move(columnNames)), m_ColumnWidths(std::move(columnWidths)), m_FirstRow(true),
m_TableClosed(false)
: m_ColumnNames(std::move(columnNames)), m_ColumnWidths(std::move(columnWidths)), m_FirstRow(true),
m_TableClosed(false)
{
if (m_ColumnWidths.size() != m_ColumnNames.size())
{
Expand Down

0 comments on commit fcf7e7a

Please sign in to comment.