Skip to content

Commit

Permalink
Static analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
HairyFotr committed Jan 5, 2016
1 parent e669ee1 commit a62e1fa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions Caption.scala
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ final object Caption extends RegexParsers {

def standardInterpolator(process: String => String, args: Seq[Any]): String = {
checkLengths(args)
val pi = parts.iterator
val ai = args.iterator
val builder = new StringBuilder(process(pi.next()))
while (ai.hasNext) {
val partsIter: Iterator[String] = parts.iterator
val argsIter: Iterator[Any] = args.iterator
val builder = new StringBuilder(process(partsIter.next()))
while (argsIter.hasNext) {
val arg =
ai.next.toString
argsIter.next.toString
.replace("|", "%%%%pipe%%%%")
.replace("[", "%%%lbrack%%%")
.replace("]", "%%%rbrack%%%")
Expand All @@ -87,7 +87,7 @@ final object Caption extends RegexParsers {
.replace("@", "%%%atsign%%%")

builder append ("@@@"+arg+"@@@")
val part = pi.next()
val part = partsIter.next()
builder append process(part)
}
builder.toString
Expand Down
2 changes: 1 addition & 1 deletion OCR.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ object OCR {
))
}

// TODO put this in a case class or something :)
//TODO: put this in a case class or something :)

val SIZE = 0
val COMMON = 1
Expand Down

0 comments on commit a62e1fa

Please sign in to comment.