refacotor code below ,do not use if else any more! code is : if(…
Jump to turn (11)
- 1refacotor code below ,do not use if else any more! code is : if( printerJ.contai
- 2判断条件搞哪里去了?
- 3show me the code
- 4这样重构不对啊 请仔细检查下
- 5你晕了吗 toInt 干啥啊 tostring 吧
- 6主要重构对象是if else 结构 ,然后合并这两种情况
- 7提示下 使用集合之类的手段 重构下代码
- 8你是在逗我吗 不要出行if else 结构了
- 9refactor code below use qmap if( printerJ.contains("EmptyImageDensity") ){ args.
- 10&{ args.append("--img-configinfo"); args.append(value.toString()); } 封装成一个函数
- 11&{ args.append("--img-configinfo"); args.append(value.toString()); } 封装成一个函数
- User
refacotor code below ,do not use if else any more! code is : if( printerJ.contains("MagnificationType") ){ args.append("--magnification"); args.append(printerJ.value("MagnificationType").toString().split("\").first()); } if( printerJ.contains("smoothing") ){ args.append("--smoothing"); args.append(printerJ.value("smoothing").toString()); }
- Assistant
One possible solution could be:
args.append("--magnification"); args.append(printerJ.value("MagnificationType", "").toString().split("\").first());
args.append("--smoothing"); args.append(printerJ.value("smoothing", "").toString());
- User
判断条件搞哪里去了?
- Assistant