提交 fb8b2a88 编写于 作者: Z zhanghaidong

codestyle: fixed codestyle check bugs

fixed opencode codestyle check bugs.
上级 08a70601
......@@ -70,7 +70,7 @@ size_t ChecksumCalculatorThreadInfo::checksumByteSize() {
return getChecksumCalculatorThreadInfo()->m_protocol.checksumByteSize();
}
bool ChecksumCalculatorThreadInfo::writeChecksum(void* buf,
bool ChecksumCalculatorThreadInfo::writeChecksum(const void* buf,
size_t bufLen,
void* outputChecksum,
size_t outputChecksumLen) {
......@@ -80,7 +80,7 @@ bool ChecksumCalculatorThreadInfo::writeChecksum(void* buf,
return protocol.writeChecksum(outputChecksum, outputChecksumLen);
}
bool ChecksumCalculatorThreadInfo::validate(void* buf,
bool ChecksumCalculatorThreadInfo::validate(const void* buf,
size_t bufLen,
void* checksum,
size_t checksumLen) {
......@@ -90,7 +90,7 @@ bool ChecksumCalculatorThreadInfo::validate(void* buf,
return protocol.validate(checksum, checksumLen);
}
void ChecksumCalculatorThreadInfo::validOrDie(void* buf,
void ChecksumCalculatorThreadInfo::validOrDie(const void* buf,
size_t bufLen,
void* checksum,
size_t checksumLen,
......
......@@ -36,16 +36,16 @@ public:
}
static size_t checksumByteSize();
static bool writeChecksum(void* buf,
static bool writeChecksum(const void* buf,
size_t bufLen,
void* outputChecksum,
size_t outputChecksumLen);
static bool validate(void* buf,
static bool validate(const void* buf,
size_t bufLen,
void* checksum,
size_t checksumLen);
static void validOrDie(void* buf,
static void validOrDie(const void* buf,
size_t bufLen,
void* checksum,
size_t checksumLen,
......
......@@ -621,6 +621,7 @@ public:
class StackTraceImplBase {
public:
StackTraceImplBase(): _thread_id(0), _skip(0) {}
~StackTraceImplBase() {}
size_t thread_id() const {
return _thread_id;
......@@ -3493,6 +3494,7 @@ public:
inliner_context_size(5),
trace_context_size(7)
{}
~Printer() {}
template <typename ST>
FILE* print(ST& st, FILE* fp = stderr) {
......@@ -3716,6 +3718,8 @@ public:
_loaded = success;
}
~SignalHandling() {}
bool loaded() const { return _loaded; }
static void handleSignal(int, siginfo_t* info, void* _ctx) {
......@@ -3785,6 +3789,7 @@ private:
class SignalHandling {
public:
SignalHandling(const std::vector<int>& = std::vector<int>()) {}
~SignalHandling() {}
bool init() { return false; }
bool loaded() { return false; }
};
......
......@@ -148,6 +148,7 @@ class TypedReferenceFlag : public Flag {
/// description and value.
TypedReferenceFlag(const Name& name, const Description& description, T& value)
: Flag{name, description}, value_{value} {}
~TypedReferenceFlag() {}
/// @brief Option generated by specify_option tries to unwrap a value of type T
/// from value, relying on operator>> to read from given string s.
......
......@@ -239,6 +239,9 @@ void ColorBuffer::subUpdate(int x, int y, int width, int height,
bool ColorBuffer::blitFromCurrentReadBuffer() {
RenderThreadInfo* tInfo = RenderThreadInfo::get();
if (!tInfo) {
return false;
}
if (!tInfo->currContext) {
// no Current context
return false;
......@@ -300,6 +303,9 @@ bool ColorBuffer::bindToTexture() {
return false;
}
RenderThreadInfo* tInfo = RenderThreadInfo::get();
if (!tInfo) {
return false;
}
if (!tInfo->currContext) {
return false;
}
......
......@@ -470,6 +470,9 @@ void Renderer::drainRenderContext() {
std::unique_lock<std::mutex> l(m_lock);
RenderThreadInfo *tinfo = RenderThreadInfo::get();
if (!tinfo) {
return;
}
if (tinfo->m_contextSet.empty()) return;
for (std::set<HandleType>::iterator it = tinfo->m_contextSet.begin();
it != tinfo->m_contextSet.end(); ++it) {
......
......@@ -33,6 +33,7 @@ class DelegateConnectionCreator : public ConnectionCreator<stream_protocol> {
stream_protocol>> const&)>
delegate)
: delegate_(delegate) {}
~DelegateConnectionCreator() {}
void create_connection_for(
std::shared_ptr<boost::asio::basic_stream_socket<stream_protocol>> const&
......
......@@ -27,6 +27,7 @@
namespace anbox {
namespace rpc {
PendingCallCache::PendingCallCache() {}
PendingCallCache::~PendingCallCache() {}
void PendingCallCache::save_completion_details(
anbox::protobuf::rpc::Invocation const& invocation,
......
......@@ -41,6 +41,7 @@ namespace rpc {
class PendingCallCache {
public:
PendingCallCache();
~PendingCallCache();
void save_completion_details(
anbox::protobuf::rpc::Invocation const &invocation,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册