Skip to content

Commit

Permalink
[C++]: formatting to fix #266
Browse files Browse the repository at this point in the history
  • Loading branch information
tmontgomery committed Aug 24, 2016
1 parent fe5729b commit bb0f2b9
Show file tree
Hide file tree
Showing 60 changed files with 52 additions and 72 deletions.
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/Aeron.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ inline MemoryMappedFile::ptr_t Aeron::mapCncFile(Context &context)
return cncBuffer;
}

}
}
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/Aeron.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,4 @@ class Aeron

}

#endif
#endif
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/ClientConductor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,4 +475,4 @@ void ClientConductor::lingerResources(long now, Image* images, int imagesLength)
}
}

}
}
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/ClientConductor.h
Original file line number Diff line number Diff line change
Expand Up @@ -298,4 +298,4 @@ class ClientConductor

}

#endif
#endif
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/CncFileDescriptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,4 @@ inline static std::int64_t clientLivenessTimeout(MemoryMappedFile::ptr_t cncFile

};

#endif
#endif
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/Context.h
Original file line number Diff line number Diff line change
Expand Up @@ -354,4 +354,4 @@ class Context

}

#endif
#endif
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/DriverListenerAdapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,4 @@ class DriverListenerAdapter

}

#endif
#endif
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/DriverProxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,4 @@ class DriverProxy

}

#endif
#endif
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/LogBuffers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ LogBuffers::LogBuffers(std::uint8_t *address, index_t length)

LogBuffers::~LogBuffers() = default;

}
}
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/Publication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ bool Publication::isPublicationConnected(std::int64_t timeOfLastStatusMessage) c
return m_conductor.isPublicationConnected(timeOfLastStatusMessage);
}

}
}
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/Publication.h
Original file line number Diff line number Diff line change
Expand Up @@ -427,4 +427,4 @@ class Publication

}

#endif
#endif
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/Subscription.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ Subscription::~Subscription()
m_conductor.releaseSubscription(m_registrationId, m_images, m_imagesLength);
}

}
}
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/Subscription.h
Original file line number Diff line number Diff line change
Expand Up @@ -343,4 +343,4 @@ class Subscription

}

#endif
#endif
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/command/ControlProtocolEvents.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ struct ControlProtocolEvents
};

}};
#endif
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ class CorrelatedMessageFlyweight : public Flyweight<CorrelatedMessageDefn>
};

}};
#endif
#endif
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/command/Flyweight.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ class Flyweight

}}

#endif
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,4 @@ class ImageBuffersReadyFlyweight : public Flyweight<ImageBuffersReadyDefn>

}};

#endif
#endif
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/command/ImageMessageFlyweight.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ class ImageMessageFlyweight : public Flyweight<ImageMessageDefn>
};

}}
#endif
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,4 @@ class PublicationBuffersReadyFlyweight : public Flyweight<PublicationBuffersRead

}};

#endif
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ class PublicationMessageFlyweight : public CorrelatedMessageFlyweight

}};

#endif
#endif
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/command/RemoveMessageFlyweight.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ class RemoveMessageFlyweight : public CorrelatedMessageFlyweight
};

}};
#endif
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,4 @@ class SubscriptionMessageFlyweight : public CorrelatedMessageFlyweight
};

}};
#endif
#endif
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/concurrent/AgentRunner.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ class AgentRunner

}}

#endif
#endif
2 changes: 0 additions & 2 deletions aeron-client/src/main/cpp/concurrent/AtomicCounter.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,3 @@ class AtomicCounter
}}

#endif


Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ class BusySpinIdleStrategy

}}

#endif
#endif
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/concurrent/CountersManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@ class CountersManager : public CountersReader

}}

#endif
#endif
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/concurrent/logbuffer/Header.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,4 @@ class Header

}}}

#endif
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,4 @@ inline void read(

}}}

#endif
#endif
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/util/BitUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,4 @@ namespace BitUtil
}};


#endif
#endif
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/util/CommandOption.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@ void CommandOption::validate() const
throw CommandOptionException(std::string("option -") + m_optionChar + " has too few parameters specified.", SOURCEINFO);
}

}}
}}
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/util/CommandOptionParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ void CommandOptionParser::displayOptionsHelp (std::ostream& out)
}
}

}}
}}
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/util/Exceptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,4 @@ class RegistrationException : public SourcedException
};

}}
#endif
#endif
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/util/MacroUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
#define AERON_COND_EXPECT(exp,c) (exp)
#endif

#endif
#endif
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/util/MemoryMappedFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,4 +299,4 @@ std::int64_t MemoryMappedFile::getFileSize(const char *filename)

#endif

}}
}}
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/util/Platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@
#error Unsupported compiler!
#endif

#endif
#endif
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/util/ScopeUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ class OnScopeExit
}}


#endif
#endif
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/util/StringUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,4 @@ static T fromString (const std::string &str)

}}

#endif
#endif
2 changes: 1 addition & 1 deletion aeron-client/src/test/cpp/FragmentAssemblerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,4 +234,4 @@ TEST_F(FragmentAssemblerTest, shouldNotReassembleIfMissingBegin)
fillFrame(FrameDescriptor::END_FRAG, MTU_LENGTH * 2, msgLength, (msgLength * 2) % 256);
adapter.handler()(m_buffer, (MTU_LENGTH * 2) + DataFrameHeader::LENGTH, msgLength, m_header);
ASSERT_FALSE(called);
}
}
2 changes: 1 addition & 1 deletion aeron-client/src/test/cpp/ImageTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -446,4 +446,4 @@ TEST_F(ImageTest, shouldPollFragmentsToControlledFragmentHandlerOnContinue)
EXPECT_EQ(fragments, 2);
EXPECT_EQ(m_subscriberPosition.get(), initialPosition + ALIGNED_FRAME_LENGTH * 2);
EXPECT_EQ(image.position(), initialPosition + ALIGNED_FRAME_LENGTH * 2);
}
}
2 changes: 1 addition & 1 deletion aeron-client/src/test/cpp/PublicationTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,4 @@ TEST_F(PublicationTest, shouldRotateWhenClaimTrips)

EXPECT_GT(m_publication->tryClaim(SRC_BUFFER_LENGTH, bufferClaim), initialPosition + DataFrameHeader::LENGTH + m_srcBuffer.capacity());
EXPECT_GT(m_publication->position(), initialPosition + DataFrameHeader::LENGTH + m_srcBuffer.capacity());
}
}
2 changes: 1 addition & 1 deletion aeron-client/src/test/cpp/command/CommandTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,4 @@ TEST (commandTests, testImageBuffersReadyFlyweight)
sizeof(std::int32_t) + sourceInfoData.length()));
}
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -298,4 +298,4 @@ TEST_F(BroadcastReceiverTest, shouldDealWithRecordBecomingInvalidDueToOverwrite)
EXPECT_EQ(m_broadcastReceiver.offset(), RecordDescriptor::msgOffset(recordOffset));
EXPECT_EQ(m_broadcastReceiver.length(), length);
EXPECT_FALSE(m_broadcastReceiver.validate());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -266,4 +266,4 @@ TEST_F(BroadcastTransmitterTest, shouldApplyPaddingWhenInsufficientSpaceAtEndOfB
.InSequence(sequence);

m_broadcastTransmitter.transmit(MSG_TYPE_ID, srcBuffer, srcIndex, length);
}
}
2 changes: 0 additions & 2 deletions aeron-client/src/test/cpp/concurrent/CountersManagerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,5 +180,3 @@ TEST_F(CountersManagerTest, shouldStoreAndLoadValue)
m_countersManager.setCounterValue(counterId, value);
EXPECT_EQ(m_countersManager.getCounterValue(counterId), value);
}


Original file line number Diff line number Diff line change
Expand Up @@ -197,4 +197,3 @@ TEST_F(DistinctErrorLogTest, shouldRecordTwoDistinctObservations)

EXPECT_TRUE(m_errorLog.record(2, "description 2", "message"));
}

Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,4 @@ TEST_F(ErrorLogReaderTest, shouldReadOneObservationSinceTimestamp)
EXPECT_TRUE(log.record(2, "description 2", "message"));

EXPECT_EQ(ErrorLogReader::read(m_mockBuffer, m_consumer, 10), 1);
}
}
2 changes: 1 addition & 1 deletion aeron-client/src/test/cpp/concurrent/MockAtomicBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ MockAtomicBuffer::MockAtomicBuffer(std::uint8_t *buffer, util::index_t length) :

MockAtomicBuffer::~MockAtomicBuffer() = default;

}}};
}}};
2 changes: 1 addition & 1 deletion aeron-client/src/test/cpp/concurrent/MockAtomicBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ class MockAtomicBuffer : public AtomicBuffer

}}}

#endif
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -494,4 +494,3 @@ TEST(OneToOneRingBufferConcurrentTest, shouldExchangeMessages)
printf("EXCEPTION unknown\n");
}
}

2 changes: 1 addition & 1 deletion aeron-client/src/test/cpp/concurrent/TermAppenderTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,4 +282,4 @@ TEST_F(TermAppenderTest, shouldClaimRegionForZeroCopyEncoding)
EXPECT_EQ(bufferClaim.length(), msgLength);

bufferClaim.commit();
}
}
2 changes: 1 addition & 1 deletion aeron-client/src/test/cpp/concurrent/TermReaderTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,4 +253,4 @@ TEST_F(TermReaderTest, shouldNotReadLastMessageWhenPadding)

EXPECT_EQ(readOutcome.offset, TERM_BUFFER_CAPACITY);
EXPECT_EQ(readOutcome.fragmentsRead, 0);
}
}
2 changes: 1 addition & 1 deletion aeron-client/src/test/cpp/util/MemoryMappedFileTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ TEST(mmfileTest, writeReadCheck)
}

::unlink(name.c_str());
}
}
11 changes: 0 additions & 11 deletions aeron-driver/src/main/cpp/DataPacketDispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,3 @@ void DataPacketDispatcher::removeCoolDown(std::int32_t sessionId, std::int32_t s
m_ignoredSessions.erase({sessionId, streamId});
}
}











2 changes: 1 addition & 1 deletion aeron-driver/src/main/cpp/buffer/MappedRawLog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@ void MappedRawLog::allocatePages(std::uint8_t *mapping, size_t length)
}
}

}}}
}}}
2 changes: 1 addition & 1 deletion aeron-driver/src/main/cpp/media/NetworkInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ void NetworkInterface::setAsMulticastInterface(int socketFd) const
default:
throw IllegalStateException("Invalid address type", SOURCEINFO);
}
}
}
2 changes: 1 addition & 1 deletion aeron-samples/src/main/cpp/AeronStat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,4 @@ int main (int argc, char** argv)
}

return 0;
}
}
Loading

0 comments on commit bb0f2b9

Please sign in to comment.