/[svn]/libgig/trunk/src/Serialization.cpp
ViewVC logotype

Diff of /libgig/trunk/src/Serialization.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3138 by schoenebeck, Wed May 3 14:41:58 2017 UTC revision 3139 by schoenebeck, Wed May 3 15:15:10 2017 UTC
# Line 26  Line 26 
26  #include <iostream>  #include <iostream>
27  #include <assert.h>  #include <assert.h>
28  #include <string.h> // for memcpy()  #include <string.h> // for memcpy()
29  #include <stdlib.h> // for atof() and atof_l()  #include <stdlib.h> // for atof()
 #include <xlocale.h> // for locale passed to atof_l()  
30    
31  #include "helper.h"  #include "helper.h"
32    
# Line 487  namespace Serialization { Line 486  namespace Serialization {
486          String s(p, size_t(end - p));          String s(p, size_t(end - p));
487    
488          T_real r;          T_real r;
489          if (sizeof(T_real) == sizeof(float))          if (sizeof(T_real) <= sizeof(double))
490              r = atof(s.c_str());              r = atof(s.c_str());
         else if (sizeof(T_real) == sizeof(double))  
             r = atof_l(s.c_str(), _c_locale);  
491          else          else
492              assert(false /* unknown real type */);              assert(false /* unknown real type */);
493    

Legend:
Removed from v.3138  
changed lines
  Added in v.3139

  ViewVC Help
Powered by ViewVC