W3C home > Mailing lists > Public > public-media-capture@w3.org > July 2014

Nit: Maybe have default values in ConstrainLongRange etc.

From: Jan-Ivar Bruaroey <jib@mozilla.com>
Date: Tue, 08 Jul 2014 12:23:58 -0400
Message-ID: <53BC1B1E.3020501@mozilla.com>
To: "public-media-capture@w3.org" <public-media-capture@w3.org>
Hi, some minor implementer's feedback.

I'm adding these default values to ranges in my implementation, because 
it makes the code simpler:

dictionary ConstrainLongRange {
     long min = -2147483647; // +1 works around windows compiler bug
     long max = 2147483647;
};

dictionary ConstrainDoubleRange {
     unrestricted double min = -Infinity;
     unrestricted double max = Infinity;
};

This way I don't have to check whether range values are passed in, I can 
just use them.

Maybe worth putting in the spec?

.: Jan-Ivar :.
Received on Tuesday, 8 July 2014 17:27:02 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:26:28 UTC