summaryrefslogtreecommitdiff
path: root/source/modules/asura-utils/io/io_task.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-07-30 22:12:11 +0800
committerchai <chaifix@163.com>2019-07-30 22:12:11 +0800
commit012a44bd13ab41d056e7d3884a39027b6cea62b5 (patch)
treed835819273cdc394b5339072b887399cde3aea27 /source/modules/asura-utils/io/io_task.cpp
parent51a715ffe0b138960846e9f407a1290037931b33 (diff)
*修改成员变量前缀
Diffstat (limited to 'source/modules/asura-utils/io/io_task.cpp')
-rw-r--r--source/modules/asura-utils/io/io_task.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/source/modules/asura-utils/io/io_task.cpp b/source/modules/asura-utils/io/io_task.cpp
index ca03b09..6c323de 100644
--- a/source/modules/asura-utils/io/io_task.cpp
+++ b/source/modules/asura-utils/io/io_task.cpp
@@ -12,8 +12,8 @@ namespace AsuraEngine
{
IOTask::IOTask(const std::string& path, DataBuffer* buffer, IOTaskType type)
- : mPath(path)
- , mBuffer(buffer)
+ : m_Path(path)
+ , m_Buffer(buffer)
{
if (buffer)
buffer->Retain();
@@ -21,24 +21,24 @@ namespace AsuraEngine
IOTask::~IOTask()
{
- if (mBuffer)
- mBuffer->Release();
+ if (m_Buffer)
+ m_Buffer->Release();
}
bool IOTask::Execute()
{
- File file(mPath);
- if (mType == IOTASK_TYPE_WRITE)
+ File file(m_Path);
+ if (m_Type == IOTASK_TYPE_WRITE)
{
}
// pathȡݱmBuffer
- else if (mType == IOTASK_TYPE_READ)
+ else if (m_Type == IOTASK_TYPE_READ)
{
- if (!mBuffer)
+ if (!m_Buffer)
return false;
file.Open(File::FILE_MODE_READ);
- file.ReadAll(mBuffer);
+ file.ReadAll(m_Buffer);
file.Close();
}
return true;
@@ -46,12 +46,12 @@ namespace AsuraEngine
void IOTask::Invoke(lua_State* invokeThreaad)
{
- if (mCallback)
+ if (m_Callback)
{
LuaxScopedState state(invokeThreaad);
- if (this->PushLuaxMemberRef(state, mCallback))
+ if (this->PushLuaxMemberRef(state, m_Callback))
{
- this->PushLuaxMemberRef(state, mBufferRef);
+ this->PushLuaxMemberRef(state, m_BufferRef);
state.Call(1, 0);
}
}