weechat-protocol.js: move getSlice()

This commit is contained in:
Philippe Proulx 2013-10-05 15:32:32 -04:00
parent 0c02cae6a9
commit fef3e7542a

View file

@ -101,13 +101,6 @@ WeeChatProtocol.prototype = {
return ""; return "";
}, },
_getSlice: function(length) {
var slice = this._data.slice(this._dataAt, this._dataAt + length);
this._dataAt += length;
return slice;
},
_getHeader: function() { _getHeader: function() {
var len = this._getInt(); var len = this._getInt();
var comp = this._getChar(); var comp = this._getChar();
@ -147,6 +140,13 @@ WeeChatProtocol.prototype = {
return values; return values;
}, },
_getSlice: function(length) {
var slice = this._data.slice(this._dataAt, this._dataAt + length);
this._dataAt += length;
return slice;
},
_setData: function (data) { _setData: function (data) {
this._data = data; this._data = data;
}, },