Allow building with -Wgnu-conditional-omitted-operand
authorChristopher Dykes <cdykes@fb.com>
Mon, 12 Dec 2016 19:46:03 +0000 (11:46 -0800)
committerFacebook Github Bot <facebook-github-bot-bot@fb.com>
Mon, 12 Dec 2016 19:48:05 +0000 (11:48 -0800)
Summary: Which warns about the use of a ternary statement with the first operand omitted. This is a GCC extension and MSVC does not support it, so eliminate the last use of it.

Reviewed By: yfeldblum

Differential Revision: D4309989

fbshipit-source-id: 04c968708e47f8cb707fd0892e8780bc676df0de

folly/experimental/symbolizer/Symbolizer.cpp

index 49451104a08bc1bd89f77ad698f5f427a301301a..e6f9ce9c534d2b96f251757f0ac5e60d497c3162 100644 (file)
@@ -78,7 +78,7 @@ void SymbolizedFrame::set(const std::shared_ptr<ElfFile>& file,
 }
 
 Symbolizer::Symbolizer(ElfCacheBase* cache, Dwarf::LocationInfoMode mode)
-  : cache_(cache ?: defaultElfCache()), mode_(mode) {
+  : cache_(cache ? cache : defaultElfCache()), mode_(mode) {
 }
 
 void Symbolizer::symbolize(const uintptr_t* addresses,