Skip to content

Resolve class/struct distinction warning from clang #171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/proclog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ class movable_ofstream_WAR {
}
};

class BFproclog_impl {
struct BFproclog_impl {
private:
friend class ProcLogStream;
std::string _filename;
public:
Expand Down
32 changes: 19 additions & 13 deletions src/ring_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,17 @@
#include <memory>

class BFsequence_impl;
class BFspan_impl;
class BFrspan_impl;
class BFwspan_impl;
struct BFspan_impl;
struct BFrspan_impl;
struct BFwspan_impl;
class RingReallocLock;
class Guarantee;
typedef std::shared_ptr<BFsequence_impl> BFsequence_sptr;

class BFring_impl {
friend class BFrsequence_impl;
friend class BFwsequence_impl;
struct BFring_impl {
private:
friend struct BFrsequence_impl;
friend struct BFwsequence_impl;
friend class RingReallocLock;
friend class Guarantee;

Expand Down Expand Up @@ -256,7 +257,7 @@ inline std::unique_ptr<Guarantee> new_guarantee(BFring ring) {
}

class BFsequence_impl {
friend class BFring_impl;
friend struct BFring_impl;
enum { BF_SEQUENCE_OPEN = (BFoffset)-1 };
BFring _ring;
std::string _name;
Expand Down Expand Up @@ -290,7 +291,7 @@ class BFsequence_impl {
inline BFoffset end() const { return _end; }
};

class BFsequence_wrapper {
struct BFsequence_wrapper {
protected:
BFsequence_sptr _sequence;
public:
Expand All @@ -306,7 +307,8 @@ class BFsequence_wrapper {
inline BFoffset begin() const { return _sequence->begin(); }
};

class BFwsequence_impl : public BFsequence_wrapper {
struct BFwsequence_impl : public BFsequence_wrapper {
private:
BFoffset _end_offset_from_head;
BFwsequence_impl(BFwsequence_impl const& ) = delete;
BFwsequence_impl& operator=(BFwsequence_impl const& ) = delete;
Expand All @@ -333,7 +335,8 @@ class BFwsequence_impl : public BFsequence_wrapper {
}
};

class BFrsequence_impl : public BFsequence_wrapper {
struct BFrsequence_impl : public BFsequence_wrapper {
private:
std::unique_ptr<Guarantee> _guarantee;
public:
// TODO: See if can make these function bodies a bit more concise
Expand Down Expand Up @@ -376,7 +379,8 @@ class BFrsequence_impl : public BFsequence_wrapper {
*/
};

class BFspan_impl {
struct BFspan_impl {
private:
BFring _ring;
BFsize _size;
// No copy or move
Expand All @@ -401,7 +405,8 @@ class BFspan_impl {
virtual void* data() const = 0;
virtual BFoffset offset() const = 0;
};
class BFwspan_impl : public BFspan_impl {
struct BFwspan_impl : public BFspan_impl {
private:
BFoffset _begin;
BFsize _commit_size;
void* _data;
Expand All @@ -423,7 +428,8 @@ class BFwspan_impl : public BFspan_impl {
// Can't easily change the name though because it's a shared API
inline virtual BFoffset offset() const { return _begin; }
};
class BFrspan_impl : public BFspan_impl {
struct BFrspan_impl : public BFspan_impl {
private:
BFrsequence _sequence;
BFoffset _begin;
void* _data;
Expand Down
3 changes: 2 additions & 1 deletion src/udp_capture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,8 @@ inline uint64_t round_nearest(uint64_t val, uint64_t mult) {
return (2*val/mult+1)/2*mult;
}

class BFudpcapture_impl {
struct BFudpcapture_impl {
private:
UDPCaptureThread _capture;
CHIPSDecoder _decoder;
CHIPSProcessor8bit _processor;
Expand Down
3 changes: 2 additions & 1 deletion src/udp_transmit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ class UDPTransmitThread : public BoundThread {
}
};

class BFudptransmit_impl {
struct BFudptransmit_impl {
private:
UDPTransmitThread _transmit;
ProcLog _type_log;
ProcLog _bind_log;
Expand Down