mirror of
https://github.com/chararomandroid/android_device_samsung_a20
synced 2026-08-24 04:45:32 -04:00
universal7885: libfileio: Fix the unoverloadable function error
device/samsung/universal7885-common/apps/aidl-support/libfileio/FileIO.cpp:27:5: error: functions that differ only in their return type cannot be overloaded
int readline(const char *path) {
~~~ ^
device/samsung/universal7885-common/apps/aidl-support/libfileio/FileIO.cpp:12:13: note: previous definition is here
std::string readline(const char *path) {
~~~~~~~~~~~ ^
1 error generated.
- Rename int version to 'readint' to fix
This commit is contained in:
parent
eea872d99a
commit
8d728a6111
6 changed files with 7 additions and 7 deletions
|
|
@ -24,7 +24,7 @@ std::string readline(const char *path) {
|
|||
return value;
|
||||
}
|
||||
|
||||
int readline(const char *path) {
|
||||
int readint(const char *path) {
|
||||
const std::string value = readline(path);
|
||||
try {
|
||||
return stoi(value);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace FileIO {
|
||||
std::string readline(const char *path);
|
||||
int readline(const char *path);
|
||||
int readint(const char *path);
|
||||
|
||||
void writeline(const char *path, const std::string& data);
|
||||
void writeline(const char *path, const int data);
|
||||
|
|
|
|||
Loading…
Reference in a new issue