simplify code in topologymanager
This commit is contained in:
		@@ -35,10 +35,7 @@ func (p *restrictedPolicy) Name() string {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (p *restrictedPolicy) canAdmitPodResult(hint *TopologyHint) bool {
 | 
					func (p *restrictedPolicy) canAdmitPodResult(hint *TopologyHint) bool {
 | 
				
			||||||
	if !hint.Preferred {
 | 
						return hint.Preferred
 | 
				
			||||||
		return false
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return true
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (p *restrictedPolicy) Merge(providersHints []map[string][]TopologyHint) (TopologyHint, bool) {
 | 
					func (p *restrictedPolicy) Merge(providersHints []map[string][]TopologyHint) (TopologyHint, bool) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -40,10 +40,7 @@ func (p *singleNumaNodePolicy) Name() string {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (p *singleNumaNodePolicy) canAdmitPodResult(hint *TopologyHint) bool {
 | 
					func (p *singleNumaNodePolicy) canAdmitPodResult(hint *TopologyHint) bool {
 | 
				
			||||||
	if !hint.Preferred {
 | 
						return hint.Preferred
 | 
				
			||||||
		return false
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return true
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Return hints that have valid bitmasks with exactly one bit set.
 | 
					// Return hints that have valid bitmasks with exactly one bit set.
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user