THRIFT-1518. cpp: Generated C++ code only sends the first optional field in the write() function for a struct There was some incorrect else if logic added to the CPP generated code, which this patch replaces with the proper functionality. Patch: Thomas Wiggins