Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1287)

Issue 153970043: Eliminate "will never be null" warnings in smobs.tcc. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 6 months ago by Dan Eble
Modified:
9 years, 6 months ago
Reviewers:
dak
CC:
lilypond-devel_gnu.org
Base URL:
http://git.savannah.gnu.org/gitweb/?p=lilypond.git/trunk/
Visibility:
Public.

Description

Eliminate "will never be null" warnings in smobs.tcc.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -6 lines) Patch
M lily/include/smobs.tcc View 2 chunks +41 lines, -6 lines 0 comments Download

Messages

Total messages: 2
Dan Eble
It's verbose, but it does the trick portably (I think).
9 years, 6 months ago (2014-10-04 04:12:14 UTC) #1
dak
9 years, 6 months ago (2014-10-04 04:32:43 UTC) #2
On 2014/10/04 04:12:14, Dan Eble wrote:
> It's verbose, but it does the trick portably (I think).

Too clever.  I don't want to obfuscate the code like that (bringing type
overloading into play) just to dance around a warning.  print_smob does not need
a check: we'll always set something other than the default print routine.  The
other checks are going the way of mark_smob: just create a do-nothing default
function, and don't bother installing it when it has not been overridden.

I went through that dear-compiler-are-you-serious dance when turning mark_smob
into a member function (incidentally, that's what print_smob is going to do as
well).  No point in doing the others in a different manner.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b