X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2FFile.cpp;h=be44ce572925cb614a26d54c2b86fe86f5566e4a;hb=00ff5917775f9b58a04f74835585cbb32e306289;hp=3c53573355fc6a9d2dec13e50d36a323d83680e2;hpb=e20eed09e0d77047b8e1efbcbfc1cb46e6cf0d97;p=folly.git diff --git a/folly/File.cpp b/folly/File.cpp index 3c535733..be44ce57 100644 --- a/folly/File.cpp +++ b/folly/File.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2015 Facebook, Inc. + * Copyright 2017 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,14 +16,14 @@ #include -#include -#include -#include #include #include #include #include +#include +#include +#include #include @@ -31,14 +31,9 @@ namespace folly { -File::File() - : fd_(-1) - , ownsFd_(false) -{} +File::File() noexcept : fd_(-1), ownsFd_(false) {} -File::File(int fd, bool ownsFd) - : fd_(fd) - , ownsFd_(ownsFd) { +File::File(int fd, bool ownsFd) noexcept : fd_(fd), ownsFd_(ownsFd) { CHECK_GE(fd, -1) << "fd must be -1 or non-negative"; CHECK(fd != -1 || !ownsFd) << "cannot own -1"; }