projects
/
fw
/
sdcc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* sim/ucsim/*.*, sim/ucsim/configure, sim/ucsim/configure.in:
[fw/sdcc]
/
sim
/
ucsim
/
sim.src
/
itsrc.cc
diff --git
a/sim/ucsim/sim.src/itsrc.cc
b/sim/ucsim/sim.src/itsrc.cc
index 0a5636c86788ac6760632199854120421d0ec495..32fc69594fccd7018b6ec354fbc2f4ee1fa66f5f 100644
(file)
--- a/
sim/ucsim/sim.src/itsrc.cc
+++ b/
sim/ucsim/sim.src/itsrc.cc
@@
-46,7
+46,7
@@
cl_it_src::cl_it_src(uchar Iie_mask,
uchar Isrc_mask,
uint Iaddr,
bool Iclr_bit,
uchar Isrc_mask,
uint Iaddr,
bool Iclr_bit,
- char *Iname,
+ c
onst c
har *Iname,
int apoll_priority):
cl_base()
{
int apoll_priority):
cl_base()
{
@@
-57,16
+57,13
@@
cl_it_src::cl_it_src(uchar Iie_mask,
addr = Iaddr;
clr_bit = Iclr_bit;
if (Iname != NULL)
addr = Iaddr;
clr_bit = Iclr_bit;
if (Iname != NULL)
-
name= strdup
(Iname);
+
set_name
(Iname);
else
else
-
name= strdup
("unknown");
+
set_name
("unknown");
active= DD_TRUE;
}
active= DD_TRUE;
}
-cl_it_src::~cl_it_src(void)
-{
- free(name);
-}
+cl_it_src::~cl_it_src(void) {}
bool
cl_it_src::is_active(void)
bool
cl_it_src::is_active(void)
@@
-97,12
+94,12
@@
cl_it_src::deactivate(void)
*/
cl_irqs::cl_irqs(t_index alimit, t_index adelta):
*/
cl_irqs::cl_irqs(t_index alimit, t_index adelta):
- cl_sorted_list(alimit, adelta)
+ cl_sorted_list(alimit, adelta
, "irqs"
)
{
Duplicates= DD_TRUE;
}
{
Duplicates= DD_TRUE;
}
-void *
+
const
void *
cl_irqs::key_of(void *item)
{
class cl_it_src *itsrc= (class cl_it_src *)item;
cl_irqs::key_of(void *item)
{
class cl_it_src *itsrc= (class cl_it_src *)item;
@@
-110,13
+107,13
@@
cl_irqs::key_of(void *item)
}
int
}
int
-cl_irqs::compare(
void *key1,
void *key2)
+cl_irqs::compare(
const void *key1, const
void *key2)
{
{
-
int *k1= (int*)key1, *k2= (int*)key2
;
+
const int k1= *static_cast<const int *>(key1), k2= *static_cast<const int *>(key2)
;
- if (
*k1 == *
k2)
+ if (
k1 ==
k2)
return(0);
return(0);
- else if (
*k1 < *
k2)
+ else if (
k1 <
k2)
return(-1);
return(1);
}
return(-1);
return(1);
}