Skip to content

Commit

Permalink
del[lua]: remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysunxiao committed Oct 18, 2023
1 parent d3d79b3 commit 468a1bd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 80 deletions.

This file was deleted.

38 changes: 0 additions & 38 deletions protocol/src/main/resources/lua/Buffer/ByteBuffer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -408,21 +408,6 @@ function ByteBuffer:readString()
return self:readBuffer(length)
end

--char
function ByteBuffer:writeChar(charValue)
if charValue == nil or #charValue == 0 then
self:writeString("")
return
end
local str = utf8sub(charValue, 1, 1)
self:writeString(str)
return self
end

function ByteBuffer:readChar()
return self:readString()
end

--- Write a encoded char array into buf
function ByteBuffer:writeBuffer(str)
for i = 1, #str do
Expand Down Expand Up @@ -641,29 +626,6 @@ function ByteBuffer:readDoubleArray()
return array
end

function ByteBuffer:writeCharArray(array)
if array == null then
self:writeInt(0)
else
self:writeInt(#array);
for index, element in pairs(array) do
self:writeChar(element)
end
end
return self
end

function ByteBuffer:readCharArray()
local array = {}
local size = self:readInt()
if size > 0 then
for index = 1, size do
table.insert(array, self:readChar())
end
end
return array
end

function ByteBuffer:writeStringArray(array)
if array == null then
self:writeInt(0)
Expand Down

0 comments on commit 468a1bd

Please sign in to comment.