Ver código fonte

sys: const correctness in file operations.

undefined
Sam Hocevar 10 anos atrás
pai
commit
f67d7ecb0f
2 arquivos alterados com 4 adições e 4 exclusões
  1. +1
    -1
      src/lol/sys/file.h
  2. +3
    -3
      src/sys/file.cpp

+ 1
- 1
src/lol/sys/file.h Ver arquivo

@@ -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 Ver arquivo

@@ -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);
}


Carregando…
Cancelar
Salvar