瀏覽代碼

LibCore: Remove Core::IODevice::printf()

Andreas Kling 4 年之前
父節點
當前提交
406c876fce
共有 2 個文件被更改,包括 0 次插入16 次删除
  1. 0 14
      Userland/Libraries/LibCore/IODevice.cpp
  2. 0 2
      Userland/Libraries/LibCore/IODevice.h

+ 0 - 14
Userland/Libraries/LibCore/IODevice.cpp

@@ -5,7 +5,6 @@
  */
 
 #include <AK/ByteBuffer.h>
-#include <AK/PrintfImplementation.h>
 #include <LibCore/IODevice.h>
 #include <errno.h>
 #include <stdio.h>
@@ -271,19 +270,6 @@ bool IODevice::write(const u8* data, int size)
     return rc == size;
 }
 
-int IODevice::printf(const char* format, ...)
-{
-    va_list ap;
-    va_start(ap, format);
-    // FIXME: We're not propagating write() failures to client here!
-    int ret = printf_internal([this](char*&, char ch) {
-        write((const u8*)&ch, 1);
-    },
-        nullptr, format, ap);
-    va_end(ap);
-    return ret;
-}
-
 void IODevice::set_fd(int fd)
 {
     if (m_fd == fd)

+ 0 - 2
Userland/Libraries/LibCore/IODevice.h

@@ -84,8 +84,6 @@ public:
     virtual bool open(IODevice::OpenMode) = 0;
     virtual bool close();
 
-    int printf(const char*, ...);
-
     LineIterator line_begin() & { return LineIterator(*this); }
     LineIterator line_end() { return LineIterator(*this, true); }