Skip to content

Commit da3fe45

Browse files
committed
Merge pull request #250 from starseeker/master
Merge local BRL-CAD changes
2 parents a60e03d + 1ffac4e commit da3fe45

File tree

6 files changed

+19
-22
lines changed

6 files changed

+19
-22
lines changed

src/base/sc_memmgr.cc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,8 @@
44
#include <sc_cf.h>
55
#include "sc_memmgr.h"
66

7-
#if __APPLE__
8-
# include <malloc/malloc.h>
9-
#else
10-
# include <malloc.h>
11-
#endif
127
#include <stdio.h>
8+
#include <stdlib.h>
139

1410
#include <string>
1511
#include <set>

src/cldai/sdaiDaObject.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ class SC_DAI_EXPORT SDAI_DAObject : public SDAI_sdaiObject {
186186
virtual ~SDAI_DAObject();
187187

188188
Logical dado_same( SDAI_DAObject_ptr obj ) {
189+
if (obj == this) return LTrue;
189190
return LUnknown;
190191
}
191192

src/cldai/sdaiModel_contents.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class SC_DAI_EXPORT SDAI_Model_contents_instances : public SDAI_DAObject {
4141
}
4242
SDAI_DAObject__set_var contents_() const {
4343
return ( const SDAI_DAObject__set_var ) &_instances;
44-
};
44+
}
4545

4646
};
4747

src/cllazyfile/lazyInstMgr.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void lazyInstMgr::addLazyInstance( namedLazyInstance inst ) {
5151
*/
5252
positionAndSection ps = inst.loc.section;
5353
ps <<= 48;
54-
ps |= ( inst.loc.begin & 0xFFFFFFFFFFFF );
54+
ps |= ( inst.loc.begin & 0xFFFFFFFFFFFFULL );
5555
_instanceStreamPos.insert( inst.loc.instance, ps );
5656

5757
if( inst.refs ) {
@@ -104,7 +104,7 @@ SDAI_Application_instance * lazyInstMgr::loadInstance( instanceID id ) {
104104
case 1:
105105
long int off;
106106
ps = cv->at( 0 );
107-
off = ps & 0xFFFFFFFFFFFF;
107+
off = ps & 0xFFFFFFFFFFFFULL;
108108
sid = ps >> 48;
109109
assert( _dataSections.size() > sid );
110110
inst = _dataSections[sid]->getRealInstance( _mainRegistry, off, id );

src/cllazyfile/p21HeaderSectionReader.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ const namedLazyInstance p21HeaderSectionReader::nextInstance() {
5454
assert( strlen( i.name ) > 0 );
5555

5656
std::streampos end = seekInstanceEnd( 0 ); //no references in file header
57-
if( ( end == -1 ) || ( end >= _sectionEnd ) ) {
57+
if( ( (signed long int)end == -1 ) || ( end >= _sectionEnd ) ) {
5858
//invalid instance, so clear everything
5959
i.loc.begin = -1;
6060
i.name = 0;
6161
}
6262
}
6363
return i;
64-
}
64+
}

src/clstepcore/ExpDict.cc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Explicit_item_id__set::Explicit_item_id__set( int defaultSize ) {
2828
}
2929

3030
Explicit_item_id__set::~Explicit_item_id__set() {
31-
delete [] _buf;
31+
delete[] _buf;
3232
}
3333

3434
void Explicit_item_id__set::Check( int index ) {
@@ -38,7 +38,7 @@ void Explicit_item_id__set::Check( int index ) {
3838
_bufsize = ( index + 1 ) * 2;
3939
newbuf = new Explicit_item_id_ptr[_bufsize];
4040
memmove( newbuf, _buf, _count * sizeof( Explicit_item_id_ptr ) );
41-
delete _buf;
41+
delete[] _buf;
4242
_buf = newbuf;
4343
}
4444
}
@@ -117,7 +117,7 @@ Implicit_item_id__set::Implicit_item_id__set( int defaultSize ) {
117117
}
118118

119119
Implicit_item_id__set::~Implicit_item_id__set() {
120-
delete _buf;
120+
delete[] _buf;
121121
}
122122

123123
void Implicit_item_id__set::Check( int index ) {
@@ -127,7 +127,7 @@ void Implicit_item_id__set::Check( int index ) {
127127
_bufsize = ( index + 1 ) * 2;
128128
newbuf = new Implicit_item_id_ptr[_bufsize];
129129
memmove( newbuf, _buf, _count * sizeof( Implicit_item_id_ptr ) );
130-
delete _buf;
130+
delete[]_buf;
131131
_buf = newbuf;
132132
}
133133
}
@@ -206,7 +206,7 @@ Interface_spec__set::Interface_spec__set( int defaultSize ) {
206206
}
207207

208208
Interface_spec__set::~Interface_spec__set() {
209-
delete [] _buf;
209+
delete[] _buf;
210210
}
211211

212212
void Interface_spec__set::Check( int index ) {
@@ -216,7 +216,7 @@ void Interface_spec__set::Check( int index ) {
216216
_bufsize = ( index + 1 ) * 2;
217217
newbuf = new Interface_spec_ptr[_bufsize];
218218
memmove( newbuf, _buf, _count * sizeof( Interface_spec_ptr ) );
219-
delete _buf;
219+
delete[] _buf;
220220
_buf = newbuf;
221221
}
222222
}
@@ -1025,7 +1025,7 @@ Where_rule__list::Where_rule__list( int defaultSize ) {
10251025
Where_rule__list::~Where_rule__list() {
10261026
Clear();
10271027

1028-
delete _buf;
1028+
delete[] _buf;
10291029
}
10301030

10311031
void Where_rule__list::Check( int index ) {
@@ -1035,7 +1035,7 @@ void Where_rule__list::Check( int index ) {
10351035
_bufsize = ( index + 1 ) * 2;
10361036
newbuf = new Where_rule_ptr[_bufsize];
10371037
memmove( newbuf, _buf, _count * sizeof( Where_rule_ptr ) );
1038-
delete _buf;
1038+
delete[] _buf;
10391039
_buf = newbuf;
10401040
}
10411041
}
@@ -1134,7 +1134,7 @@ Uniqueness_rule__set::Uniqueness_rule__set( int defaultSize ) {
11341134
Uniqueness_rule__set::~Uniqueness_rule__set() {
11351135
Clear();
11361136

1137-
delete _buf;
1137+
delete[] _buf;
11381138
}
11391139

11401140
void Uniqueness_rule__set::Check( int index ) {
@@ -1144,7 +1144,7 @@ void Uniqueness_rule__set::Check( int index ) {
11441144
_bufsize = ( index + 1 ) * 2;
11451145
newbuf = new Uniqueness_rule_ptr[_bufsize];
11461146
memmove( newbuf, _buf, _count * sizeof( Uniqueness_rule_ptr ) );
1147-
delete _buf;
1147+
delete[] _buf;
11481148
_buf = newbuf;
11491149
}
11501150
}
@@ -1255,7 +1255,7 @@ Global_rule__set::Global_rule__set( int defaultSize ) {
12551255

12561256
Global_rule__set::~Global_rule__set() {
12571257
Clear();
1258-
delete _buf;
1258+
delete[] _buf;
12591259
}
12601260

12611261
void Global_rule__set::Check( int index ) {
@@ -1265,7 +1265,7 @@ void Global_rule__set::Check( int index ) {
12651265
_bufsize = ( index + 1 ) * 2;
12661266
newbuf = new Global_rule_ptr[_bufsize];
12671267
memmove( newbuf, _buf, _count * sizeof( Global_rule_ptr ) );
1268-
delete [] _buf;
1268+
delete[] _buf;
12691269
_buf = newbuf;
12701270
}
12711271
}

0 commit comments

Comments
 (0)