最新消息:20190717 VPS服务器:Vultr新加坡,WordPress主题:大前端D8,统一介绍入口:关于

【已解决】’++’ ‘–‘ is deprecated: it will be removed in Swift 3

Swift crifan 515浏览 0评论

代码:

        for i in 0..<bufferLen {
            if buffer[i] == CRLFBytes[k] {
                k++
            for var sectionIdx = contactSectionItemList.count – 1; sectionIdx >= 0 ; –sectionIdx {

警告:

‘++’ is deprecated: it will be removed in Swift 3

‘–‘ is deprecated: it will be removed in Swift 3

根据提示去:

改为:

            if buffer[i] == CRLFBytes[k] {
                k += 1
            for var sectionIdx = contactSectionItemList.count 1; sectionIdx >= 0 ; sectionIdx -= 1 {

即可。

对于++放在变量后面的特殊情况,改为:

                //return (String(self.arrayIndex++), JSON(o))
                let curArrIdx = self.arrayIndex
                self.arrayIndex += 1
                return (String(curArrIdx), JSON(o))

即可。

转载请注明:在路上 » 【已解决】’++’ ‘–‘ is deprecated: it will be removed in Swift 3

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
60 queries in 0.088 seconds, using 18.61MB memory