Skip to content

Commit

Permalink
fix: adjust code based on comments from review.
Browse files Browse the repository at this point in the history
issue: #349
  • Loading branch information
CodeBear801 committed May 28, 2020
1 parent 2b78541 commit 0b46118
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ func NewQuerierBasedOnWeightBetweenNeighborsChan(c chan stationfindertype.Weight
func (q *querier) NearByStationQuery(placeID common.PlaceID) []*common.RankedPlaceInfo {
if results, ok := q.id2QueryResults[placeID]; ok {
return results
} else {
return nil
}

return nil
}

// GetLocation returns location of given station id
Expand Down
4 changes: 2 additions & 2 deletions integration/service/oasis/stationgraph/station_graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ func NewStationGraph(currEnergyLevel, maxEnergyLevel float64, strategy chargings
func (sg *stationGraph) setStartAndEndForGraph(currEnergyLevel, maxEnergyLevel float64) bool {
startLocation := sg.querier.GetLocation(stationfindertype.OrigLocationID)
if startLocation == nil {
glog.Errorf("Failed to find %#v from Querier GetLocation()\n", stationfindertype.OrigLocationID.String())
glog.Errorf("Failed to find %#v from Querier GetLocation()\n", stationfindertype.OrigLocationID)
return false
}

endLocation := sg.querier.GetLocation(stationfindertype.DestLocationID)
if startLocation == nil {
glog.Errorf("Failed to find %#v from Querier GetLocation()\n", stationfindertype.DestLocationID.String())
glog.Errorf("Failed to find %#v from Querier GetLocation()\n", stationfindertype.DestLocationID)
return false
}

Expand Down

0 comments on commit 0b46118

Please sign in to comment.