Skip to content

Commit

Permalink
Merge pull request #56 from XYOracleNetwork/develop
Browse files Browse the repository at this point in the history
last refactor of structure
  • Loading branch information
Phillip Lorenzo committed Apr 8, 2020
2 parents 991d73e + a8b5f20 commit 5743419
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ platform :ios, '11.0'
use_frameworks!

target '<Your Target Name>' do
pod 'sdk-core-swift', '3.1.5'
pod 'sdk-core-swift', '3.1.6'
end
```

Expand Down
2 changes: 1 addition & 1 deletion sdk-core-swift.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'sdk-core-swift'
s.version = '3.1.5'
s.version = '3.1.6'
s.summary = 'Core Library for XYO Network in Swift.'
s.swift_version = '5.0'

Expand Down
12 changes: 6 additions & 6 deletions sdk-core-swift/objectmodel/XyoIterableStructure.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ open class XyoIterableStructure: XyoObjectStructure {
i += 1
}

throw XyoObjectError.OUT_OF_INDEX
throw XyoObjectError.OUTOFINDEX
}

public func get (id : UInt8) throws -> [XyoObjectStructure] {
Expand Down Expand Up @@ -73,7 +73,7 @@ open class XyoIterableStructure: XyoObjectStructure {
let sizeOfObject = readSizeOfObject(sizeIdentifier : schemaOfItem.getSizeIdentifier(), offset: offset + 2)

if (sizeOfObject == 0) {
throw XyoObjectError.SIZE_ZERO
throw XyoObjectError.SIZEZERO
}

let start = offset + value.allowedOffset
Expand All @@ -94,7 +94,7 @@ open class XyoIterableStructure: XyoObjectStructure {
let sizeOfObject = readSizeOfObject(sizeIdentifier : schemaOfItem.getSizeIdentifier(), offset: offset)

if (sizeOfObject == 0) {
throw XyoObjectError.SIZE_ZERO
throw XyoObjectError.SIZEZERO
}

let start = offset + value.allowedOffset
Expand All @@ -119,7 +119,7 @@ open class XyoIterableStructure: XyoObjectStructure {
let totalSize = readSizeOfObject(sizeIdentifier: setHeader.getSizeIdentifier(), offset: 2)

if (!setHeader.getIsIterable()) {
throw XyoObjectError.NOT_ITERABLE
throw XyoObjectError.NOTITERABLE
}

if (setHeader.getIsTypedIterable() && totalSize != setHeader.getSizeIdentifier().rawValue) {
Expand All @@ -143,7 +143,7 @@ open class XyoIterableStructure: XyoObjectStructure {
return
}

throw XyoObjectError.WRONG_TYPE
throw XyoObjectError.WRONGTYPE
}

buffer.put(buffer: element.getBuffer())
Expand Down Expand Up @@ -209,7 +209,7 @@ open class XyoIterableStructure: XyoObjectStructure {
}

if (values.isEmpty) {
throw XyoObjectError.NO_ELEMENTS
throw XyoObjectError.NOELEMENTS
}

let buffer = XyoBuffer()
Expand Down
2 changes: 1 addition & 1 deletion sdk-core-swift/objectmodel/XyoObjectStructure.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ open class XyoObjectStructure {

internal func checkIndex (index : Int) throws {
if (index > value.getSize()) {
throw XyoObjectError.OUT_OF_INDEX
throw XyoObjectError.OUTOFINDEX
}
}

Expand Down

0 comments on commit 5743419

Please sign in to comment.