Skip to content

Commit

Permalink
IdMapEntry: address reviewer comments
Browse files Browse the repository at this point in the history
  • Loading branch information
hcook committed May 22, 2020
1 parent b445a73 commit 8f4e969
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/scala/diplomacy/Parameters.scala
Original file line number Diff line number Diff line change
Expand Up @@ -324,13 +324,13 @@ trait DirectedBuffers[T] {
}

trait IdMapEntry {
val name: String
val from: IdRange
val to: IdRange
val isCache: Boolean
val requestFifo: Boolean
def name: String
def from: IdRange
def to: IdRange
def isCache: Boolean
def requestFifo: Boolean
def pretty(fmt: String) =
if (from ne to) {
if (from ne to) { // if the subclass uses the same reference for both from and to, assume its format string has an arity of 5
fmt.format(to.start, to.end, from.start, from.end, s""""$name"""", if (isCache) " [CACHE]" else "", if (requestFifo) " [FIFO]" else "")
} else {
fmt.format(from.start, from.end, s""""$name"""", if (isCache) " [CACHE]" else "", if (requestFifo) " [FIFO]" else "")
Expand Down

0 comments on commit 8f4e969

Please sign in to comment.