Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
3b2fe97b
Commit
3b2fe97b
authored
Jul 30, 2015
by
Jon Skeet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor bits of left-over frozenness.
parent
7a0effb9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
7 deletions
+1
-7
MapField.cs
csharp/src/Google.Protobuf/Collections/MapField.cs
+1
-6
RepeatedField.cs
csharp/src/Google.Protobuf/Collections/RepeatedField.cs
+0
-1
No files found.
csharp/src/Google.Protobuf/Collections/MapField.cs
View file @
3b2fe97b
...
...
@@ -54,7 +54,6 @@ namespace Google.Protobuf.Collections
{
// TODO: Don't create the map/list until we have an entry. (Assume many maps will be empty.)
private
readonly
bool
allowNullValues
;
private
bool
frozen
;
private
readonly
Dictionary
<
TKey
,
LinkedListNode
<
KeyValuePair
<
TKey
,
TValue
>>>
map
=
new
Dictionary
<
TKey
,
LinkedListNode
<
KeyValuePair
<
TKey
,
TValue
>>>();
private
readonly
LinkedList
<
KeyValuePair
<
TKey
,
TValue
>>
list
=
new
LinkedList
<
KeyValuePair
<
TKey
,
TValue
>>();
...
...
@@ -254,7 +253,7 @@ namespace Google.Protobuf.Collections
public
bool
AllowsNullValues
{
get
{
return
allowNullValues
;
}
}
public
int
Count
{
get
{
return
list
.
Count
;
}
}
public
bool
IsReadOnly
{
get
{
return
f
rozen
;
}
}
public
bool
IsReadOnly
{
get
{
return
f
alse
;
}
}
public
override
bool
Equals
(
object
other
)
{
...
...
@@ -416,10 +415,6 @@ namespace Google.Protobuf.Collections
set
{
if
(
frozen
)
{
throw
new
NotSupportedException
(
"Dictionary is frozen"
);
}
this
[(
TKey
)
key
]
=
(
TValue
)
value
;
}
}
...
...
csharp/src/Google.Protobuf/Collections/RepeatedField.cs
View file @
3b2fe97b
...
...
@@ -48,7 +48,6 @@ namespace Google.Protobuf.Collections
private
static
readonly
T
[]
EmptyArray
=
new
T
[
0
];
private
const
int
MinArraySize
=
8
;
private
bool
frozen
;
private
T
[]
array
=
EmptyArray
;
private
int
count
=
0
;
...
...
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