mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
libretroshare remove unuseful code from RsRawItem
This commit is contained in:
parent
7a2ae6e979
commit
746f4d7292
@ -178,32 +178,21 @@ std::ostream &printIndent(std::ostream &out, uint16_t indent);
|
||||
|
||||
class RsRawItem: public RsItem
|
||||
{
|
||||
public:
|
||||
RsRawItem(uint32_t t, uint32_t size)
|
||||
:RsItem(t), len(size)
|
||||
{
|
||||
data = rs_malloc(len);
|
||||
}
|
||||
public:
|
||||
RsRawItem(uint32_t t, uint32_t size) : RsItem(t), len(size)
|
||||
{ data = rs_malloc(len); }
|
||||
virtual ~RsRawItem() { free(data); }
|
||||
|
||||
virtual ~RsRawItem()
|
||||
{
|
||||
if (data)
|
||||
free(data);
|
||||
data = NULL;
|
||||
len = 0;
|
||||
}
|
||||
uint32_t getRawLength() { return len; }
|
||||
void * getRawData() { return data; }
|
||||
|
||||
uint32_t getRawLength() { return len; }
|
||||
void *getRawData() { return data; }
|
||||
virtual void clear() {}
|
||||
virtual std::ostream &print(std::ostream &out, uint16_t indent = 0);
|
||||
|
||||
virtual void clear() { return; } /* what can it do? */
|
||||
virtual std::ostream &print(std::ostream &out, uint16_t indent = 0);
|
||||
|
||||
private:
|
||||
void *data;
|
||||
uint32_t len;
|
||||
private:
|
||||
void *data;
|
||||
uint32_t len;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* RS_BASE_SERIALISER_H */
|
||||
|
Loading…
Reference in New Issue
Block a user