Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
VTK
VTK
Commits
bc8e5cd4
Commit
bc8e5cd4
authored
Jun 10, 1994
by
Ken Martin
Browse files
minor fix
parent
257d6003
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/BArray.hh
View file @
bc8e5cd4
...
...
@@ -30,14 +30,17 @@ public:
vlBitArray
(
const
int
sz
,
const
int
ext
);
vlBitArray
(
const
vlBitArray
&
ia
);
~
vlBitArray
();
int
GetValue
(
const
int
id
)
{
return
(
this
->
Array
[
id
/
8
]
&
(
0x80
>>
(
id
%
8
)));};
int
GetValue
(
const
int
id
)
{
if
(
this
->
Array
[
id
/
8
]
&
(
0x80
>>
(
id
%
8
)))
return
1
;
return
0
;};
char
*
GetPtr
(
const
int
id
)
{
return
this
->
Array
+
id
/
8
;};
vlBitArray
&
SetValue
(
const
int
id
,
const
int
i
)
{
if
(
i
)
this
->
Array
[
id
/
8
]
|=
(
0x80
>>
id
%
8
);
else
this
->
Array
[
id
/
8
]
&=
(
~
(
0x80
>>
id
%
8
));
if
(
id
>
this
->
MaxId
)
this
->
MaxId
=
id
;
}
vlBitArray
&
InsertValue
(
const
int
id
,
const
int
i
)
{
if
(
id
>=
this
->
Size
)
this
->
Resize
(
id
);
...
...
@@ -46,6 +49,7 @@ public:
if
(
id
>
this
->
MaxId
)
this
->
MaxId
=
id
;
return
*
this
;
}
int
InsertNextValue
(
const
int
i
)
{
this
->
InsertValue
(
++
this
->
MaxId
,
i
);
return
this
->
MaxId
;};
vlBitArray
&
operator
=
(
const
vlBitArray
&
ia
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment