aboutsummaryrefslogtreecommitdiffhomepage
path: root/env_universal_common.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-08-05 11:58:17 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-08-05 12:01:53 -0700
commitfdc6c3722a3a857c839cfdf798a5bbbd006164e4 (patch)
tree4a05424ac16491c5c0c207f3af0e0a6507ec98c0 /env_universal_common.h
parentdeca47597237e8ed03a8aacff632a4e7d3ae77e9 (diff)
Fixed a bunch of clang analyzer warnings
Simplified some memory allocations by migrating to std::string
Diffstat (limited to 'env_universal_common.h')
-rw-r--r--env_universal_common.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/env_universal_common.h b/env_universal_common.h
index 14ce77d2..11991dcd 100644
--- a/env_universal_common.h
+++ b/env_universal_common.h
@@ -3,6 +3,7 @@
#include <wchar.h>
#include <queue>
+#include <string>
#include "util.h"
/**
@@ -63,12 +64,13 @@ typedef struct
Number of queues that contain this message. Once this reaches zero, the message should be deleted
*/
int count;
+
/**
Message body. The message must be allocated using enough memory to actually contain the message.
*/
- char body[1];
-}
- message_t;
+ std::string body;
+
+} message_t;
typedef std::queue<message_t *> message_queue_t;