Commit 00de64bb authored by David Renshaw's avatar David Renshaw

fix more errors reported by 'clang++ -Werror'

parent bc93d04e
......@@ -51,7 +51,7 @@ private:
bool initialized = false;
};
class Compiler::Node: public NodeTranslator::Resolver {
class Compiler::Node final: public NodeTranslator::Resolver {
// Passes through four states:
// - Stub: On initial construction, the Node is just a placeholder object. Its ID has been
// determined, and it is placed in its parent's member table as well as the compiler's
......
......@@ -52,7 +52,7 @@ public:
// Read and return the content of a file specified using `embed`.
};
class Compiler: private SchemaLoader::LazyLoadCallback {
class Compiler final: private SchemaLoader::LazyLoadCallback {
// Cross-links separate modules (schema files) and translates them into schema nodes.
//
// This class is thread-safe, hence all its methods are const.
......
......@@ -270,7 +270,7 @@ public:
}
};
struct Group: public StructOrGroup {
struct Group final: public StructOrGroup {
public:
class DataLocationUsage {
public:
......
......@@ -32,7 +32,7 @@ namespace {
using Thing = test::TestMembrane::Thing;
class ThingImpl: public Thing::Server {
class ThingImpl final: public Thing::Server {
public:
ThingImpl(kj::StringPtr text): text(text) {}
......@@ -51,7 +51,7 @@ private:
kj::StringPtr text;
};
class TestMembraneImpl: public test::TestMembrane::Server {
class TestMembraneImpl final: public test::TestMembrane::Server {
protected:
kj::Promise<void> makeThing(MakeThingContext context) override {
context.getResults().setThing(kj::heap<ThingImpl>("inside"));
......
......@@ -339,18 +339,18 @@ public:
// authenticate this, so that the caller can be assured that they are really talking to the
// identified vat and not an imposter.
virtual kj::Own<OutgoingRpcMessage> newOutgoingMessage(uint firstSegmentWordSize) = 0;
virtual kj::Own<OutgoingRpcMessage> newOutgoingMessage(uint firstSegmentWordSize) override = 0;
// Allocate a new message to be sent on this connection.
//
// If `firstSegmentWordSize` is non-zero, it should be treated as a hint suggesting how large
// to make the first segment. This is entirely a hint and the connection may adjust it up or
// down. If it is zero, the connection should choose the size itself.
virtual kj::Promise<kj::Maybe<kj::Own<IncomingRpcMessage>>> receiveIncomingMessage() = 0;
virtual kj::Promise<kj::Maybe<kj::Own<IncomingRpcMessage>>> receiveIncomingMessage() override = 0;
// Wait for a message to be received and return it. If the read stream cleanly terminates,
// return null. If any other problem occurs, throw an exception.
virtual kj::Promise<void> shutdown() KJ_WARN_UNUSED_RESULT = 0;
virtual kj::Promise<void> shutdown() override KJ_WARN_UNUSED_RESULT = 0;
// Waits until all outgoing messages have been sent, then shuts down the outgoing stream. The
// returned promise resolves after shutdown is complete.
......
......@@ -585,7 +585,7 @@ private:
uint countLeft;
OnReadyEvent onReadyEvent;
class Branch: public Event {
class Branch final: public Event {
public:
Branch(ArrayJoinPromiseNodeBase& joinNode, Own<PromiseNode> dependency,
ExceptionOrValue& output);
......
......@@ -34,12 +34,12 @@ typedef Quantity<int, Bytes> ByteCount;
typedef Quantity<int, KiB> KiBCount;
typedef Quantity<int, MiB> MiBCount;
constexpr ByteCount BYTE = unit<ByteCount>();
constexpr ByteCount BYTE KJ_UNUSED = unit<ByteCount>();
constexpr KiBCount KIB = unit<KiBCount>();
constexpr MiBCount MIB = unit<MiBCount>();
constexpr UnitRatio<int, Bytes, KiB> BYTES_PER_KIB = 1024 * BYTE / KIB;
constexpr UnitRatio<int, Bytes, MiB> BYTES_PER_MIB = 1024 * 1024 * BYTE / MIB;
constexpr UnitRatio<int, Bytes, KiB> BYTES_PER_KIB KJ_UNUSED = 1024 * BYTE / KIB;
constexpr UnitRatio<int, Bytes, MiB> BYTES_PER_MIB KJ_UNUSED = 1024 * 1024 * BYTE / MIB;
constexpr auto KIB_PER_MIB = 1024 * KIB / MIB;
template <typename T, typename U>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment