[
https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12637646#action_12637646
]
David Reiss commented on THRIFT-72:
-----------------------------------
In kinda_by_id_less_than, after the first two conditions, you could return
abs(a->get_key()) < abs(b->get_key());
Also, what would you think about just making this a static function of the
generator instead of a struct?
Also, what would you think about naming the arguments lhs and rhs instead?
Please use spaces instead of tabs for indentation.
The okay_prefix stuff is unnecessary. You can alias the constructor arguments
to the field names and it works fine.
> C++ structure constructor
> --------------------------
>
> Key: THRIFT-72
> URL: https://issues.apache.org/jira/browse/THRIFT-72
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (C++)
> Environment: Tested on debian stable (etch)
> Reporter: Eric Anderson
> Priority: Minor
> Attachments: structure-constructor.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately. Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call. I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp. The patch is against the 20080411p1 release.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.