Commit 8af2de83 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook GitHub Bot

Use C++ to check for mobile in IOBuf

Summary:
[Folly] Use C++ v.s. the preprocessor to check for mobile in `IOBuf`.

Using C++ allows the compiler, when compiling for any platform, to see the full code for every platform and to typecheck and report errors.

Reviewed By: aditya7fb

Differential Revision: D23365674

fbshipit-source-id: 9cfe048a3114be3d6ef4522e279e19fb21f50a17
parent 90ab2b68
......@@ -1041,9 +1041,9 @@ void IOBuf::freeExtBuffer() noexcept {
SharedInfo::invokeAndDeleteEachObserver(
observerListHead, [](auto& entry) { entry.afterFreeExtBuffer(); });
#if FOLLY_MOBILE
if (kIsMobile) {
buf_ = nullptr;
#endif
}
}
void IOBuf::allocExtBuffer(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment