This commit is contained in:
Alexander Munch-Hansen 2019-10-21 16:21:00 +02:00
parent f5911f4cb6
commit 88b238da44

View File

@ -22,18 +22,19 @@ def compare_to(sortings)
end end
if defined? third pls = sortings.slice(1,sortings.length - 2).map do |ele|
"if (#{(comp first)[:if]}) { " else if (#{(comp ele)[:if]}) {
return #{(comp first)[:ret]}; return #{(comp ele)[:ret]};
} else if (#{(comp second)[:if]}) { }"
return #{(comp second)[:ret]}; end
}
return #{(comp third)[:ret]};"
else
"if (#{(comp first)[:if]}) { "if (#{(comp first)[:if]}) {
return #{(comp first)[:ret]}; return #{(comp first)[:ret]};
} }
return #{(comp second)[:ret]}; #{pls.join "\n"}
" return #{(comp sortings[sortings.length-1])[:ret]};"
end
end end