[#388] *: Remove nil check from setters

I knew one day `sed` would save me an hour of manual work:
```
sed -i -n -e '
s/) Set/) Set/
p
t setter
b end
:setter
    n
    s/nil/nil/
    t hasif
    p
    b end
    :hasif
        n
        :loop
        p
        n
        s/}/}/
        t end
        b loop
        :end
' $@
goimports -w $@
```

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-03-23 14:42:57 +03:00 committed by Alex Vanin
parent 50162741ac
commit 732dd51b1b
32 changed files with 714 additions and 2104 deletions

View file

@ -27,9 +27,7 @@ func (s *StorageGroup) GetValidationDataSize() uint64 {
// SetValidationDataSize into unified storage group structure.
func (s *StorageGroup) SetValidationDataSize(v uint64) {
if s != nil {
s.size = v
}
s.size = v
}
// GetValidationHash of unified storage group structure.
@ -43,9 +41,7 @@ func (s *StorageGroup) GetValidationHash() *refs.Checksum {
// SetValidationHash into unified storage group structure.
func (s *StorageGroup) SetValidationHash(v *refs.Checksum) {
if s != nil {
s.hash = v
}
s.hash = v
}
// GetExpirationEpoch of unified storage group structure.
@ -59,9 +55,7 @@ func (s *StorageGroup) GetExpirationEpoch() uint64 {
// SetExpirationEpoch into unified storage group structure.
func (s *StorageGroup) SetExpirationEpoch(v uint64) {
if s != nil {
s.exp = v
}
s.exp = v
}
// GetMembers of unified storage group structure. Members are objects of
@ -77,7 +71,5 @@ func (s *StorageGroup) GetMembers() []refs.ObjectID {
// SetMembers into unified storage group structure. Members are objects of
// storage group.
func (s *StorageGroup) SetMembers(v []refs.ObjectID) {
if s != nil {
s.members = v
}
s.members = v
}