Get rid of compiler warnings

This commit is contained in:
ahocevar
2014-02-23 01:50:59 +01:00
parent 696425af36
commit 7b56abdac7
3 changed files with 8 additions and 7 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
goog.provide('ol.format.GPX'); goog.provide('ol.format.GPX');
goog.provide('ol.format.GPX.v1_1'); goog.provide('ol.format.GPX.V1_1');
goog.require('goog.array'); goog.require('goog.array');
goog.require('goog.asserts'); goog.require('goog.asserts');
@@ -652,7 +652,7 @@ ol.format.GPX.TRK_SERIALIZERS_ = ol.xml.makeStructureNS(
* @param {*} value Value. * @param {*} value Value.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @param {string=} opt_nodeName Node name. * @param {string=} opt_nodeName Node name.
* @return {Node} Node. * @return {Node|undefined} Node.
* @private * @private
*/ */
ol.format.GPX.TRKSEG_NODE_FACTORY_ = ol.xml.makeSimpleNodeFactory('trkpt'); ol.format.GPX.TRKSEG_NODE_FACTORY_ = ol.xml.makeSimpleNodeFactory('trkpt');
@@ -730,7 +730,7 @@ ol.format.GPX.GEOMETRY_TYPE_TO_NODENAME_ = {
* @param {*} value Value. * @param {*} value Value.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @param {string=} opt_nodeName Node name. * @param {string=} opt_nodeName Node name.
* @return {Node} Node. * @return {Node|undefined} Node.
* @private * @private
*/ */
ol.format.GPX.GPX_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) { ol.format.GPX.GPX_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
+4 -4
View File
@@ -425,7 +425,7 @@ ol.xml.makeArraySerializer = function(nodeWriter, opt_this) {
* @param {string=} opt_namespaceURI Fixed namespace URI which will be used for * @param {string=} opt_namespaceURI Fixed namespace URI which will be used for
* all created nodes. If not provided, the namespace of the parent node will * all created nodes. If not provided, the namespace of the parent node will
* be used. * be used.
* @return {function(*, Array.<*>, string=): Node} Node factory. * @return {function(*, Array.<*>, string=): (Node|undefined)} Node factory.
*/ */
ol.xml.makeSimpleNodeFactory = function(opt_nodeName, opt_namespaceURI) { ol.xml.makeSimpleNodeFactory = function(opt_nodeName, opt_namespaceURI) {
var fixedNodeName = opt_nodeName; var fixedNodeName = opt_nodeName;
@@ -458,7 +458,7 @@ ol.xml.makeSimpleNodeFactory = function(opt_nodeName, opt_namespaceURI) {
* `nodeName` passed by {@link ol.xml.serialize} or * `nodeName` passed by {@link ol.xml.serialize} or
* {@link ol.xml.pushSerializeAndPop} to the node factory. * {@link ol.xml.pushSerializeAndPop} to the node factory.
* @const * @const
* @type {function(*, Array.<*>, string=): Node} * @type {function(*, Array.<*>, string=): (Node|undefined)}
*/ */
ol.xml.OBJECT_PROPERTY_NODE_FACTORY = ol.xml.makeSimpleNodeFactory(); ol.xml.OBJECT_PROPERTY_NODE_FACTORY = ol.xml.makeSimpleNodeFactory();
@@ -551,7 +551,7 @@ ol.xml.pushParseAndPop = function(
* Walks through an array of `values` and calls a serializer for each value. * Walks through an array of `values` and calls a serializer for each value.
* @param {Object.<string, Object.<string, ol.xml.Serializer>>} serializersNS * @param {Object.<string, Object.<string, ol.xml.Serializer>>} serializersNS
* Namespaced serializers. * Namespaced serializers.
* @param {function(this: T, *, Array.<*>, (string|undefined)): Node|undefined} nodeFactory * @param {function(this: T, *, Array.<*>, (string|undefined)): (Node|undefined)} nodeFactory
* Node factory. The `nodeFactory` creates the node whose namespace and name * Node factory. The `nodeFactory` creates the node whose namespace and name
* will be used to choose a node writer from `serializersNS`. This * will be used to choose a node writer from `serializersNS`. This
* separation allows us to decide what kind of node to create, depending on * separation allows us to decide what kind of node to create, depending on
@@ -591,7 +591,7 @@ ol.xml.serialize = function(
* @param {O} object Object. * @param {O} object Object.
* @param {Object.<string, Object.<string, ol.xml.Serializer>>} serializersNS * @param {Object.<string, Object.<string, ol.xml.Serializer>>} serializersNS
* Namespaced serializers. * Namespaced serializers.
* @param {function(this: T, *, Array.<*>, (string|undefined)): Node|undefined} nodeFactory * @param {function(this: T, *, Array.<*>, (string|undefined)): (Node|undefined)} nodeFactory
* Node factory. The `nodeFactory` creates the node whose namespace and name * Node factory. The `nodeFactory` creates the node whose namespace and name
* will be used to choose a node writer from `serializersNS`. This * will be used to choose a node writer from `serializersNS`. This
* separation allows us to decide what kind of node to create, depending on * separation allows us to decide what kind of node to create, depending on
+1
View File
@@ -401,6 +401,7 @@ describe('ol.format.GPX', function() {
goog.require('ol.Feature'); goog.require('ol.Feature');
goog.require('ol.format.GPX'); goog.require('ol.format.GPX');
goog.require('ol.format.GPX.V1_1');
goog.require('ol.geom.LineString'); goog.require('ol.geom.LineString');
goog.require('ol.geom.MultiLineString'); goog.require('ol.geom.MultiLineString');
goog.require('ol.geom.Point'); goog.require('ol.geom.Point');