Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CLHEP
CLHEP
Commits
80e2e3ce
Commit
80e2e3ce
authored
Sep 02, 2004
by
Andreas Pfeiffer
Browse files
fixed allocator problem (allocate() method needs to have two args)
parent
4fad8993
Changes
1
Hide whitespace changes
Inline
Side-by-side
Matrix/Matrix/GenMatrix.h
View file @
80e2e3ce
// -*- C++ -*-
// CLASSDOC OFF
// $Id: GenMatrix.h,v 1.3.2.
1
2004/0
8/25 18:37:41
pfeiffer Exp $
// $Id: GenMatrix.h,v 1.3.2.
2
2004/0
9/02 09:49:38
pfeiffer Exp $
// ---------------------------------------------------------------------------
// CLASSDOC ON
//
...
...
@@ -88,7 +88,7 @@ public:
Alloc
()
throw
()
{}
Alloc
(
const
Alloc
<
T
,
size
>&
)
throw
()
{}
~
Alloc
()
throw
()
{}
pointer
allocate
(
size_type
n
)
{
if
(
n
<=
size
)
return
pool
;
else
return
new
T
[
n
];
}
pointer
allocate
(
size_type
n
,
const
void
*
hint
=
0
)
{
if
(
n
<=
size
)
return
pool
;
else
return
new
T
[
n
];
}
void
deallocate
(
pointer
p
,
size_type
n
)
{
if
(
p
==
pool
)
return
;
delete
[]
p
;
}
void
construct
(
pointer
p
,
const
T
&
val
)
{
new
(
p
)
T
(
val
);
}
void
destroy
(
pointer
p
)
{
p
->~
T
();
}
...
...
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