susumu.yata
null+****@clear*****
Fri Feb 22 17:14:56 JST 2013
susumu.yata 2013-02-22 17:14:56 +0900 (Fri, 22 Feb 2013) New Revision: b9cdab9dde503b7f8889a7f496555f2d11b59b84 https://github.com/groonga/grnxx/commit/b9cdab9dde503b7f8889a7f496555f2d11b59b84 Log: Fix grnxx::io::File for Windows. Modified files: lib/io/file-windows.cpp lib/io/file-windows.hpp Modified: lib/io/file-windows.cpp (+2 -3) =================================================================== --- lib/io/file-windows.cpp 2013-02-22 16:57:36 +0900 (a4f676f) +++ lib/io/file-windows.cpp 2013-02-22 17:14:56 +0900 (31c003a) @@ -46,8 +46,7 @@ FileImpl::~FileImpl() { } } -std::unique_ptr<FileImpl> FileImpl::open(FileFlags flags, const char *path, - int permission) { +FileImpl *FileImpl::open(FileFlags flags, const char *path, int permission) { std::unique_ptr<FileImpl> file(new (std::nothrow) FileImpl); if (!file) { GRNXX_ERROR() << "new grnxx::io::FileImpl failed"; @@ -58,7 +57,7 @@ std::unique_ptr<FileImpl> FileImpl::open(FileFlags flags, const char *path, } else { file->open_regular_file(flags, path, permission); } - return file; + return file.release(); } bool FileImpl::exists(const char *path) { Modified: lib/io/file-windows.hpp (+2 -3) =================================================================== --- lib/io/file-windows.hpp 2013-02-22 16:57:36 +0900 (46cc503) +++ lib/io/file-windows.hpp 2013-02-22 17:14:56 +0900 (5ea0b03) @@ -34,12 +34,11 @@ namespace grnxx { namespace io { -class FileImpl { +class FileImpl : public File{ public: ~FileImpl(); - static std::unique_ptr<FileImpl> open(FileFlags flags, const char *path, - int permission); + static FileImpl *open(FileFlags flags, const char *path, int permission); static bool exists(const char *path); static void unlink(const char *path); -------------- next part -------------- HTML����������������������������...Download