Fixed various errors/warnings reported by cppcheck:
* memory leaks * resource leaks * added const's to getters * removed a few reundant conditions git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35433 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -27,7 +27,7 @@ class LinkReceiver {
|
||||
virtual ~LinkReceiver(void);
|
||||
|
||||
void SetPort(port_id port);
|
||||
port_id Port(void) { return fReceivePort; }
|
||||
port_id Port(void) const { return fReceivePort; }
|
||||
|
||||
status_t GetNextMessage(int32& code, bigtime_t timeout = B_INFINITE_TIMEOUT);
|
||||
bool HasMessages() const;
|
||||
|
||||
@@ -22,7 +22,7 @@ class LinkSender {
|
||||
virtual ~LinkSender(void);
|
||||
|
||||
void SetPort(port_id port);
|
||||
port_id Port() { return fPort; }
|
||||
port_id Port() const { return fPort; }
|
||||
|
||||
status_t StartMessage(int32 code, size_t minSize = 0);
|
||||
void CancelMessage(void);
|
||||
|
||||
@@ -77,10 +77,10 @@ public:
|
||||
throw fError;
|
||||
}
|
||||
|
||||
status_t Status() { return fError >= B_OK ? B_OK : fError; };
|
||||
status_t Status() const { return fError >= B_OK ? B_OK : fError; };
|
||||
|
||||
void SetSwap(bool yesNo) { fSwap = yesNo; };
|
||||
bool IsSwapping() { return fSwap; };
|
||||
bool IsSwapping() const { return fSwap; };
|
||||
|
||||
private:
|
||||
BDataIO *fStream;
|
||||
|
||||
Reference in New Issue
Block a user