Skip to content

Commit f878357

Browse files
committed
Clear some C++ compilation warnings from the main stepcode libs
1 parent 713b3e6 commit f878357

20 files changed

Lines changed: 89 additions & 45 deletions

src/base/judy/src/judy.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,7 @@ JudySlot *judy_prv(Judy *judy)
10971097

10981098
JudySlot *judy_del(Judy *judy)
10991099
{
1100-
int slot, off, size, type, high;
1100+
int slot, off, size, type;
11011101
JudySlot *table, *inner;
11021102
JudySlot next, *node;
11031103
int keysize, cnt;
@@ -1150,7 +1150,6 @@ JudySlot *judy_del(Judy *judy)
11501150
table = (JudySlot *)(next & JUDY_mask);
11511151
inner = (JudySlot *)(table[slot >> 4] & JUDY_mask);
11521152
inner[slot & 0x0F] = 0;
1153-
high = slot & 0xF0;
11541153

11551154
for(cnt = 16; cnt--;)
11561155
if(inner[cnt]) {

src/cldai/sdaiEntity_extent.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ void SDAI_Entity_extent::owned_by_(SDAI_Model_contents__list_var &mclv)
6363

6464
SDAI_Model_contents__list_var SDAI_Entity_extent ::owned_by_() const
6565
{
66-
return (const SDAI_Model_contents__list_var) &_owned_by;
66+
return (SDAI_Model_contents__list_var) &_owned_by;
6767
}
6868

6969
/*

src/cldai/sdaiEntity_extent.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class SC_DAI_EXPORT SDAI_Entity_extent : public SDAI_Session_instance
6060
}
6161
SDAI_DAObject__set_var instances_() const
6262
{
63-
return (const SDAI_DAObject__set_var)&_instances;
63+
return (SDAI_DAObject__set_var)&_instances;
6464
}
6565

6666
// need to implement Model_contents__list

src/cldai/sdaiModel_contents.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ SDAI_Model_contents::instances_()
3333
SDAI_Model_contents_instances_ptr
3434
SDAI_Model_contents::instances_() const
3535
{
36-
return (const SDAI_Model_contents_instances_ptr) &_instances;
36+
return (SDAI_Model_contents_instances_ptr) &_instances;
3737
}
3838

3939
SDAI_Entity_extent__set_var
@@ -45,7 +45,7 @@ SDAI_Model_contents::folders_()
4545
SDAI_Entity_extent__set_var
4646
SDAI_Model_contents::folders_() const
4747
{
48-
return (const SDAI_Entity_extent__set_var)&_folders;
48+
return (SDAI_Entity_extent__set_var)&_folders;
4949
}
5050

5151
SDAI_Entity_extent__set_var
@@ -57,7 +57,7 @@ SDAI_Model_contents::populated_folders_()
5757
SDAI_Entity_extent__set_var
5858
SDAI_Model_contents::populated_folders_() const
5959
{
60-
return (const SDAI_Entity_extent__set_var)&_populated_folders;
60+
return (SDAI_Entity_extent__set_var)&_populated_folders;
6161
}
6262

6363
SDAI_PID_DA_ptr SDAI_Model_contents::get_object_pid(const SDAI_DAObject_ptr &d) const

src/cldai/sdaiModel_contents.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class SC_DAI_EXPORT SDAI_Model_contents_instances : public SDAI_DAObject
4343
}
4444
SDAI_DAObject__set_var contents_() const
4545
{
46-
return (const SDAI_DAObject__set_var) &_instances;
46+
return (SDAI_DAObject__set_var) &_instances;
4747
}
4848

4949
};

src/cldai/sdaiString.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ SDAI_String &SDAI_String::operator= (const char *s)
4646
return *this;
4747
}
4848

49+
SDAI_String &SDAI_String::operator= (const SDAI_String &s)
50+
{
51+
content = s.content;
52+
return *this;
53+
}
54+
4955
bool SDAI_String::operator== (const char *s) const
5056
{
5157
return (content == s);

src/cldai/sdaiString.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
*/
1313

1414
#include <sc_export.h>
15+
#include <string>
1516
#include <limits>
1617

1718

@@ -37,6 +38,7 @@ class SC_DAI_EXPORT SDAI_String
3738

3839
// operators
3940
SDAI_String &operator= (const char *s);
41+
SDAI_String &operator= (const SDAI_String &s);
4042
bool operator== (const char *s) const;
4143

4244
void clear(void);

src/clstepcore/STEPattribute.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1498,6 +1498,7 @@ STEPattribute::~STEPattribute()
14981498
delete(SDAI_BOOLEAN *) ptr.e;
14991499
ptr.e = 0;
15001500
}
1501+
break;
15011502
case LOGICAL_TYPE:
15021503
if(ptr.e) {
15031504
delete(SDAI_LOGICAL *) ptr.e;

src/clstepcore/STEPattribute.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,17 @@ class SC_CORE_EXPORT STEPattribute
9898
void *p;
9999
} ptr;
100100

101-
const AttrDescriptor *aDesc;
102101

103102
protected:
104103
bool _derive;
105104
bool _mustDeletePtr; ///if a member uses new to create an object in ptr
106105
ErrorDescriptor _error;
107106
STEPattribute *_redefAttr;
108-
int refCount;
107+
public:
108+
const AttrDescriptor *aDesc;
109+
110+
protected:
111+
int refCount;
109112

110113
char SkipBadAttr(istream &in, char *StopChars);
111114
void AddErrorInfo();

src/clstepcore/globalRule.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ class SC_CORE_EXPORT Global_rule : public Dictionary_instance
1515
#pragma warning( disable: 4251 )
1616
#endif
1717
Express_id _name;
18-
std::string _rule_text; // non-SDAI
1918
#ifdef _MSC_VER
2019
#pragma warning( pop )
2120
#endif
2221

2322
Entity__set_var _entities; // not implemented
2423
Where_rule__list_var _where_rules;
2524
Schema_ptr _parent_schema;
25+
std::string _rule_text; // non-SDAI
2626

2727
Global_rule();
2828
Global_rule(const char *n, Schema_ptr parent_sch, const std::string &rt);

0 commit comments

Comments
 (0)