Skip to content

Commit

Permalink
remove FOLLY_OVERRIDE usage in hphp
Browse files Browse the repository at this point in the history
Summary: we currently have a mix of using 'override' and FOLLY_OVERRIDE so the macros do not help anything.

matches the removal of FOLLY_FINAL from hphp.

Reviewed By: @jdelong

Differential Revision: D1607671
  • Loading branch information
billf authored and hhvm-bot committed Oct 10, 2014
1 parent 52d52e4 commit 4b1db9c
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions hphp/runtime/base/directory.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Directory : public SweepableResourceData {
virtual bool isEof() const {
return false; // Most implementations can't tell if they've reached EOF
}
void sweep() FOLLY_OVERRIDE { close(); }
void sweep() override { close(); }

CLASSNAME_IS("Directory")
// overriding ResourceData
Expand Down Expand Up @@ -76,7 +76,7 @@ class ArrayDirectory : public Directory {
virtual void rewind();
virtual bool isEof() const;

void sweep() FOLLY_OVERRIDE {
void sweep() override {
// Leave m_it alone
Directory::sweep();
}
Expand Down
2 changes: 1 addition & 1 deletion hphp/runtime/base/file.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ class File : public SweepableResourceData {

void invokeFiltersOnClose();
void closeImpl();
virtual void sweep() FOLLY_OVERRIDE;
virtual void sweep() override;

/**
* call readImpl(m_buffer, CHUNK_SIZE), passing through stream filters if any.
Expand Down
4 changes: 2 additions & 2 deletions hphp/runtime/base/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ namespace HPHP {

#define DECLARE_RESOURCE_ALLOCATION(T) \
DECLARE_RESOURCE_ALLOCATION_NO_SWEEP(T) \
void sweep() FOLLY_OVERRIDE;
void sweep() override;

#define DECLARE_OBJECT_ALLOCATION(T) \
static void typeCheck() { \
static_assert(std::is_base_of<ObjectData,T>::value, ""); \
} \
virtual void sweep() FOLLY_OVERRIDE;
virtual void sweep() override;

#define IMPLEMENT_OBJECT_ALLOCATION(T) \
void HPHP::T::sweep() { this->~T(); }
Expand Down
2 changes: 1 addition & 1 deletion hphp/runtime/base/plain-file.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class BuiltinFile : public PlainFile {
explicit BuiltinFile(int fd) : PlainFile(fd, true) {}
virtual ~BuiltinFile();
virtual bool close();
virtual void sweep() FOLLY_OVERRIDE;
virtual void sweep() override;
};

/**
Expand Down
2 changes: 1 addition & 1 deletion hphp/runtime/base/resource-data.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class ResourceData {
*/
class SweepableResourceData : public ResourceData, public Sweepable {
protected:
void sweep() FOLLY_OVERRIDE {
void sweep() override {
// ResourceData objects are non-smart allocated by default (see
// operator delete in ResourceData), so sweeping will destroy the
// object and deallocate its seat as well.
Expand Down
2 changes: 1 addition & 1 deletion hphp/runtime/base/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class Socket : public File {
virtual bool eof();
virtual Array getMetaData();
virtual int64_t tell();
virtual void sweep() FOLLY_OVERRIDE;
virtual void sweep() override;

// check if the socket is still open
virtual bool checkLiveness();
Expand Down
4 changes: 2 additions & 2 deletions hphp/runtime/base/ssl-socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class SSLSocket : public Socket {
SSLSocket();
SSLSocket(int sockfd, int type, const char *address = nullptr, int port = 0);
virtual ~SSLSocket();
void sweep() FOLLY_OVERRIDE;
void sweep() override;

// will setup and enable crypto
bool onConnect();
Expand Down Expand Up @@ -106,7 +106,7 @@ class Certificate : public SweepableResourceData {
~Certificate() {
if (m_cert) X509_free(m_cert);
}
void sweep() FOLLY_OVERRIDE {
void sweep() override {
// calls delete this
SweepableResourceData::sweep();
}
Expand Down
2 changes: 1 addition & 1 deletion hphp/runtime/base/user-directory.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class UserDirectory : public Directory, public UserFSNode {

explicit UserDirectory(Class* cls);
~UserDirectory() {}
void sweep() FOLLY_OVERRIDE {
void sweep() override {
// Don't close like the parent, 'cause that's what zend does
}

Expand Down
2 changes: 1 addition & 1 deletion hphp/runtime/ext/ext_hash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class HashContext : public SweepableResourceData {
HashContext::sweep();
}

void sweep() FOLLY_OVERRIDE {
void sweep() override {
/* Just in case the algo has internally allocated resources */
if (context) {
assert(ops->digest_size >= 0);
Expand Down
2 changes: 1 addition & 1 deletion hphp/runtime/ext/ext_ipc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ class Semaphore : public SweepableResourceData {
Semaphore::sweep();
}

void sweep() FOLLY_OVERRIDE {
void sweep() override {
/*
* if count == -1, semaphore has been removed
* Need better way to handle this
Expand Down
2 changes: 1 addition & 1 deletion hphp/runtime/ext/gd/ext_gd.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Image : public SweepableResourceData {
Image() : m_gdImage(nullptr) {}
explicit Image(gdImagePtr gdImage) : m_gdImage(gdImage) {}
~Image();
void sweep() FOLLY_OVERRIDE;
void sweep() override;
gdImagePtr get() { return m_gdImage;}
void reset() { m_gdImage = nullptr;}

Expand Down
2 changes: 1 addition & 1 deletion hphp/runtime/ext/mcrypt/ext_mcrypt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class MCrypt : public SweepableResourceData {
MCrypt::close();
}

void sweep() FOLLY_OVERRIDE {
void sweep() override {
close();
}

Expand Down
2 changes: 1 addition & 1 deletion hphp/runtime/ext/mysql/mysql_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class MySQL : public SweepableResourceData {
const char *password, const char *database,
MYSQL* raw_connection = nullptr);
~MySQL();
void sweep() FOLLY_OVERRIDE;
void sweep() override;
void setLastError(const char *func);
void close();

Expand Down
4 changes: 2 additions & 2 deletions hphp/runtime/ext/openssl/ext_openssl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class Key : public SweepableResourceData {
~Key() {
if (m_key) EVP_PKEY_free(m_key);
}
void sweep() FOLLY_OVERRIDE {
void sweep() override {
// Base class calls delete this, which should work.
SweepableResourceData::sweep();
}
Expand Down Expand Up @@ -320,7 +320,7 @@ class CSRequest : public SweepableResourceData {
X509_REQ_free(m_csr);
}

void sweep() FOLLY_OVERRIDE {
void sweep() override {
// Base class calls delete this, which should work.
SweepableResourceData::sweep();
}
Expand Down

0 comments on commit 4b1db9c

Please sign in to comment.