serialize.cc (7532:3f6413fc37a2) | serialize.cc (7576:4154f3e1edae) |
---|---|
1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 255 unchanged lines hidden (view full) --- 264 fatal("Array size mismatch on %s:%s'\n", section, name); 265 } 266 267 for (vector<string>::size_type i = 0; i < tokens.size(); i++) { 268 // need to parse into local variable to handle vector<bool>, 269 // for which operator[] returns a special reference class 270 // that's not the same as 'bool&', (since it's a packed 271 // vector) | 1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 255 unchanged lines hidden (view full) --- 264 fatal("Array size mismatch on %s:%s'\n", section, name); 265 } 266 267 for (vector<string>::size_type i = 0; i < tokens.size(); i++) { 268 // need to parse into local variable to handle vector<bool>, 269 // for which operator[] returns a special reference class 270 // that's not the same as 'bool&', (since it's a packed 271 // vector) |
272 T scalar_value; | 272 T scalar_value = 0; |
273 if (!parseParam(tokens[i], scalar_value)) { 274 string err("could not parse \""); 275 276 err += str; 277 err += "\""; 278 279 fatal(err); 280 } --- 25 unchanged lines hidden (view full) --- 306 307 param.resize(tokens.size()); 308 309 for (vector<string>::size_type i = 0; i < tokens.size(); i++) { 310 // need to parse into local variable to handle vector<bool>, 311 // for which operator[] returns a special reference class 312 // that's not the same as 'bool&', (since it's a packed 313 // vector) | 273 if (!parseParam(tokens[i], scalar_value)) { 274 string err("could not parse \""); 275 276 err += str; 277 err += "\""; 278 279 fatal(err); 280 } --- 25 unchanged lines hidden (view full) --- 306 307 param.resize(tokens.size()); 308 309 for (vector<string>::size_type i = 0; i < tokens.size(); i++) { 310 // need to parse into local variable to handle vector<bool>, 311 // for which operator[] returns a special reference class 312 // that's not the same as 'bool&', (since it's a packed 313 // vector) |
314 T scalar_value; | 314 T scalar_value = 0; |
315 if (!parseParam(tokens[i], scalar_value)) { 316 string err("could not parse \""); 317 318 err += str; 319 err += "\""; 320 321 fatal(err); 322 } --- 265 unchanged lines hidden --- | 315 if (!parseParam(tokens[i], scalar_value)) { 316 string err("could not parse \""); 317 318 err += str; 319 err += "\""; 320 321 fatal(err); 322 } --- 265 unchanged lines hidden --- |