瀏覽代碼

sys: const correctness in file operations.

undefined
Sam Hocevar 10 年之前
父節點
當前提交
f67d7ecb0f
共有 2 個檔案被更改,包括 4 行新增4 行删除
  1. +1
    -1
      src/lol/sys/file.h
  2. +3
    -3
      src/sys/file.cpp

+ 1
- 1
src/lol/sys/file.h 查看文件

@@ -65,7 +65,7 @@ public:

int Read(uint8_t *buf, int count);
String ReadString();
int Write(uint8_t *buf, int count);
int Write(uint8_t const *buf, int count);
int WriteString(const String &buf);

private:


+ 3
- 3
src/sys/file.cpp 查看文件

@@ -129,7 +129,7 @@ class FileData
return ret;
}

int Write(uint8_t *buf, int count)
int Write(uint8_t const *buf, int count)
{
#if __CELLOS_LV2__
/*
@@ -158,7 +158,7 @@ class FileData

int WriteString(const String &buf)
{
return Write((uint8_t *)buf.C(), buf.Count());
return Write((uint8_t const *)buf.C(), buf.Count());
}

void Close()
@@ -257,7 +257,7 @@ String File::ReadString()
return m_data->ReadString();
}

int File::Write(uint8_t *buf, int count)
int File::Write(uint8_t const *buf, int count)
{
return m_data->Write(buf, count);
}


Loading…
取消
儲存