Parcourir la source

[style] add/change comment

master
extra1563 il y a 4 ans
Parent
révision
3ee24cf6d5
1 fichiers modifiés avec 4 ajouts et 5 suppressions
  1. 4
    5
      src/broker/modules/list.go

+ 4
- 5
src/broker/modules/list.go Voir le fichier

22
 }
22
 }
23
 
23
 
24
 type valueNode struct {
24
 type valueNode struct {
25
-	val  []int64 // Encrypted Topic
25
+	val  []int64 // Encrypted value
26
 	next *valueNode
26
 	next *valueNode
27
 	prev *valueNode
27
 	prev *valueNode
28
 
28
 
40
 	range2sub_eb []int // (sub_val >= pub_val) sub#s
40
 	range2sub_eb []int // (sub_val >= pub_val) sub#s
41
 }
41
 }
42
 
42
 
43
-// To delete slice Array
43
+// To delete element in slice Array
44
 func remove(ary []int, i int) []int {
44
 func remove(ary []int, i int) []int {
45
 	return append(ary[:i], ary[i+1:]...)
45
 	return append(ary[:i], ary[i+1:]...)
46
 }
46
 }
56
 }
56
 }
57
 
57
 
58
 
58
 
59
-// Compare ->  To compare (topics, values) in a node
59
+// Compare -> To compare two encrypted arrays
60
 func Compare(a []int64, b []int64) int {
60
 func Compare(a []int64, b []int64) int {
61
 	if len(a) < len(b) {
61
 	if len(a) < len(b) {
62
 		return 1
62
 		return 1
104
 	l.size++
104
 	l.size++
105
 }
105
 }
106
 
106
 
107
-
108
 // To add a Value node to the Value list
107
 // To add a Value node to the Value list
109
 func (l *valueList) addValueNode(value []int64) {
108
 func (l *valueList) addValueNode(value []int64) {
110
 	newValNode := &valueNode{value, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil}
109
 	newValNode := &valueNode{value, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil}
164
 	}
163
 	}
165
 }
164
 }
166
 
165
 
167
-// op와 같은 node내의 operator리스트에서 sub가 있다면 리턴
166
+// To check if sub# is in the Value node's operator list
168
 func (node *valueNode) findOperatorList(op string, sub int, issingle bool) int {
167
 func (node *valueNode) findOperatorList(op string, sub int, issingle bool) int {
169
 	ret := -1
168
 	ret := -1
170
 	if issingle == true {
169
 	if issingle == true {

Chargement…
Annuler
Enregistrer