Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
682dc8b0
Commit
682dc8b0
authored
Sep 27, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
485f8c21
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
wcfs/internal/xbtree/blib/rangemap.go.in
wcfs/internal/xbtree/blib/rangemap.go.in
+2
-2
wcfs/internal/xbtree/blib/rangeset.go
wcfs/internal/xbtree/blib/rangeset.go
+3
-2
wcfs/internal/xbtree/blib/zrangemap_void.go
wcfs/internal/xbtree/blib/zrangemap_void.go
+2
-2
No files found.
wcfs/internal/xbtree/blib/rangemap.go.in
View file @
682dc8b0
...
@@ -370,7 +370,7 @@ func (M *RangedMap) Clear() {
...
@@ -370,7 +370,7 @@ func (M *RangedMap) Clear() {
//
AllRanges
returns
slice
of
all
key
ranges
in
the
set
.
//
AllRanges
returns
slice
of
all
key
ranges
in
the
set
.
//
//
//
TODO
->
iter
?
//
TODO
->
iter
?
func
(
M
*
Ranged
KeySet
)
AllRanges
()
/*
readonly
*/[]
RangedMapEntry
{
func
(
M
*
Ranged
Map
)
AllRanges
()
/*
readonly
*/[]
RangedMapEntry
{
return
M
.
entryv
return
M
.
entryv
}
}
...
@@ -388,7 +388,7 @@ func (M RangedMap) String() string {
...
@@ -388,7 +388,7 @@ func (M RangedMap) String() string {
}
}
func
(
e
*
RangedMapEntry
)
String
()
string
{
func
(
e
*
RangedMapEntry
)
String
()
string
{
s
:=
e
.
keycov
.
String
()
s
:=
e
.
KeyRange
.
String
()
v
:=
fmt
.
Sprintf
(
"%v"
,
e
.
Value
)
v
:=
fmt
.
Sprintf
(
"%v"
,
e
.
Value
)
if
v
!= "" { // omit ":<v>" in the case of set
if
v
!= "" { // omit ":<v>" in the case of set
s
+=
":"
+
v
s
+=
":"
+
v
...
...
wcfs/internal/xbtree/blib/rangeset.go
View file @
682dc8b0
...
@@ -26,7 +26,7 @@ package blib
...
@@ -26,7 +26,7 @@ package blib
//
//
// Zero value represents empty set.
// Zero value represents empty set.
type
RangedKeySet
struct
{
type
RangedKeySet
struct
{
m
_RangedMap_void
// XXX naming
m
_RangedMap_void
}
}
// void is used as value type for RangedMap to be used as set.
// void is used as value type for RangedMap to be used as set.
...
@@ -89,7 +89,8 @@ func (A *RangedKeySet) UnionInplace(B *RangedKeySet) {
...
@@ -89,7 +89,8 @@ func (A *RangedKeySet) UnionInplace(B *RangedKeySet) {
defer
A
.
verify
()
defer
A
.
verify
()
// XXX dumb
// XXX dumb
for
_
,
r
:=
range
B
.
rangev
{
//for _, r := range B.rangev {
for
_
,
r
:=
range
B
.
AllRanges
()
{
A
.
AddRange
(
r
)
A
.
AddRange
(
r
)
}
}
}
}
...
...
wcfs/internal/xbtree/blib/zrangemap_void.go
View file @
682dc8b0
...
@@ -372,7 +372,7 @@ func (M *_RangedMap_void) Clear() {
...
@@ -372,7 +372,7 @@ func (M *_RangedMap_void) Clear() {
// AllRanges returns slice of all key ranges in the set.
// AllRanges returns slice of all key ranges in the set.
//
//
// TODO -> iter?
// TODO -> iter?
func
(
M
*
RangedKeySet
)
AllRanges
()
/*readonly*/
[]
_RangedMap_voidEntry
{
func
(
M
*
_RangedMap_void
)
AllRanges
()
/*readonly*/
[]
_RangedMap_voidEntry
{
return
M
.
entryv
return
M
.
entryv
}
}
...
@@ -390,7 +390,7 @@ func (M _RangedMap_void) String() string {
...
@@ -390,7 +390,7 @@ func (M _RangedMap_void) String() string {
}
}
func
(
e
*
_RangedMap_voidEntry
)
String
()
string
{
func
(
e
*
_RangedMap_voidEntry
)
String
()
string
{
s
:=
e
.
keycov
.
String
()
s
:=
e
.
KeyRange
.
String
()
v
:=
fmt
.
Sprintf
(
"%v"
,
e
.
Value
)
v
:=
fmt
.
Sprintf
(
"%v"
,
e
.
Value
)
if
v
!=
""
{
// omit ":<v>" in the case of set
if
v
!=
""
{
// omit ":<v>" in the case of set
s
+=
":"
+
v
s
+=
":"
+
v
...
...
Write
Preview
Markdown
is supported
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