Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
KWSys
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Utils
KWSys
Commits
1378bd47
Commit
1378bd47
authored
14 years ago
by
Bill Hoffman
Browse files
Options
Downloads
Patches
Plain Diff
Fix for bug #10550, work around instantiation out of scope
parent
ffad468b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
hashtable.hxx.in
+9
-3
9 additions, 3 deletions
hashtable.hxx.in
kwsysDateStamp.cmake
+1
-1
1 addition, 1 deletion
kwsysDateStamp.cmake
testAutoPtr.cxx
+1
-1
1 addition, 1 deletion
testAutoPtr.cxx
with
11 additions
and
5 deletions
hashtable.hxx.in
+
9
−
3
View file @
1378bd47
...
...
@@ -388,6 +388,10 @@ struct _Hashtable_const_iterator {
// Note: assumes long is at least 32 bits.
enum { _stl_num_primes = 31 };
// create a function with a static local to that function that returns
// the static
const unsigned long* get_stl_prime_list() {
static const unsigned long _stl_prime_list[_stl_num_primes] =
{
5ul, 11ul, 23ul,
...
...
@@ -399,10 +403,12 @@ static const unsigned long _stl_prime_list[_stl_num_primes] =
1610612741ul, 3221225473ul, 4294967291ul
};
return &_stl_prime_list[0]; }
inline size_t _stl_next_prime(size_t __n)
{
const unsigned long* __first = _stl_prime_list;
const unsigned long* __last = _stl_prime_list + (int)_stl_num_primes;
const unsigned long* __first =
get
_stl_prime_list
()
;
const unsigned long* __last =
get
_stl_prime_list
()
+ (int)_stl_num_primes;
const unsigned long* pos = @KWSYS_NAMESPACE@_stl::lower_bound(__first, __last, __n);
return pos == __last ? *(__last - 1) : *pos;
}
...
...
@@ -587,7 +593,7 @@ public:
size_type bucket_count() const { return _M_buckets.size(); }
size_type max_bucket_count() const
{ return _stl_prime_list[(int)_stl_num_primes - 1]; }
{ return
get
_stl_prime_list
()
[(int)_stl_num_primes - 1]; }
size_type elems_in_bucket(size_type __bucket) const
{
...
...
This diff is collapsed.
Click to expand it.
kwsysDateStamp.cmake
+
1
−
1
View file @
1378bd47
...
...
@@ -18,4 +18,4 @@ SET(KWSYS_DATE_STAMP_YEAR 2010)
SET
(
KWSYS_DATE_STAMP_MONTH 04
)
# KWSys version date day component. Format is DD.
SET
(
KWSYS_DATE_STAMP_DAY
19
)
SET
(
KWSYS_DATE_STAMP_DAY
28
)
This diff is collapsed.
Click to expand it.
testAutoPtr.cxx
+
1
−
1
View file @
1378bd47
...
...
@@ -25,7 +25,7 @@
#define ASSERT(x,y) if (!(x)) { printf("FAIL: " y "\n"); status = 1; }
static
int
instances
=
0
;
int
instances
=
0
;
// don't declare as static
struct
A
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment