summaryrefslogtreecommitdiffstats
path: root/src/templates.h
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-06-22 20:35:23 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2019-06-22 20:35:23 +0200
commit4e073960766efc9196fda6ce2dc2056358b88380 (patch)
treee3524ced736adf0cab56118d0b979d7e16b079ba /src/templates.h
parentFixed types in BulletTrace.h (diff)
downloadre3-4e073960766efc9196fda6ce2dc2056358b88380.tar
re3-4e073960766efc9196fda6ce2dc2056358b88380.tar.gz
re3-4e073960766efc9196fda6ce2dc2056358b88380.tar.bz2
re3-4e073960766efc9196fda6ce2dc2056358b88380.tar.lz
re3-4e073960766efc9196fda6ce2dc2056358b88380.tar.xz
re3-4e073960766efc9196fda6ce2dc2056358b88380.tar.zst
re3-4e073960766efc9196fda6ce2dc2056358b88380.zip
Diffstat (limited to 'src/templates.h')
-rw-r--r--src/templates.h42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/templates.h b/src/templates.h
index 7da0b3d6..0e9eba99 100644
--- a/src/templates.h
+++ b/src/templates.h
@@ -101,27 +101,27 @@ public:
n++;
return n;
}
- void ClearStorage(uint8 **flags, U **entries){
- delete[] flags;
- delete[] entries;
- *flags = nil;
- *entries = nil;
- }
- void CopyBack(uint8 **flags, U **entries){
- memcpy(m_flags, *flags, sizeof(Flags)*m_size);
- memcpy(m_entries, *entries, sizeof(U)*m_size);
- debug("Size copied:%d (%d)", sizeof(U)*m_size, sizeof(Flags)*m_size);
- m_allocPtr = 0;
- ClearStorage(flags, entries);
- debug("CopyBack:%d (/%d)", GetNoOfUsedSpaces(), m_size); /* Assumed inlining */
- }
- void Store(uint8 **flags, U** entries){
- *flags = (Flags*)malloc(sizeof(Flags)*size);
- *entries = (U*)malloc(sizeof(U)*size);
- memcpy(*flags, m_flags, sizeof(Flags)*m_size);
- memcpy(*entries, m_entries, sizeof(U)*m_size);
- debug("Stored:%d (/%d)", GetNoOfUsedSpaces(), m_size); /* Assumed inlining */
- }
+ void ClearStorage(uint8 **flags, U **entries){
+ delete[] flags;
+ delete[] entries;
+ *flags = nil;
+ *entries = nil;
+ }
+ void CopyBack(uint8 **flags, U **entries){
+ memcpy(m_flags, *flags, sizeof(Flags)*m_size);
+ memcpy(m_entries, *entries, sizeof(U)*m_size);
+ debug("Size copied:%d (%d)", sizeof(U)*m_size, sizeof(Flags)*m_size);
+ m_allocPtr = 0;
+ ClearStorage(flags, entries);
+ debug("CopyBack:%d (/%d)", GetNoOfUsedSpaces(), m_size); /* Assumed inlining */
+ }
+ void Store(uint8 **flags, U** entries){
+ *flags = (Flags*)malloc(sizeof(Flags)*size);
+ *entries = (U*)malloc(sizeof(U)*size);
+ memcpy(*flags, m_flags, sizeof(Flags)*m_size);
+ memcpy(*entries, m_entries, sizeof(U)*m_size);
+ debug("Stored:%d (/%d)", GetNoOfUsedSpaces(), m_size); /* Assumed inlining */
+ }
};
template<typename T>