diff options
| author | chick | 2016-09-22 10:00:30 -0700 |
|---|---|---|
| committer | jackkoenig | 2016-09-23 13:38:49 -0700 |
| commit | 7554899b46b0e97a82d23b2b0a0a480f214b6670 (patch) | |
| tree | d626a68578ac1e119807f07813368416257304e0 /src/main/scala/firrtl/PrimOps.scala | |
| parent | 24ffde94c89ef67eed4df30ba49ccf48ca46c9a9 (diff) | |
use .head instead of (0)
Diffstat (limited to 'src/main/scala/firrtl/PrimOps.scala')
| -rw-r--r-- | src/main/scala/firrtl/PrimOps.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/scala/firrtl/PrimOps.scala b/src/main/scala/firrtl/PrimOps.scala index cf2cb74e..a736dc3d 100644 --- a/src/main/scala/firrtl/PrimOps.scala +++ b/src/main/scala/firrtl/PrimOps.scala @@ -132,12 +132,12 @@ object PrimOps extends LazyLogging { case (IntWidth(i), IntWidth(j)) => IntWidth(min(i,j)) case _ => MinWidth(Seq(w1, w2)) } - def t1 = e.args(0).tpe + def t1 = e.args.head.tpe def t2 = e.args(1).tpe def t3 = e.args(2).tpe - def w1 = passes.getWidth(e.args(0).tpe) + def w1 = passes.getWidth(e.args.head.tpe) def w2 = passes.getWidth(e.args(1).tpe) - def c1 = IntWidth(e.consts(0)) + def c1 = IntWidth(e.consts.head) def c2 = IntWidth(e.consts(1)) e copy (tpe = (e.op match { case Add => (t1, t2) match { |
