Ticket #888: 0001-ticket-888-make-interval-long-long.patch

File 0001-ticket-888-make-interval-long-long.patch, 2.6 KB (added by Dimitar Misev, 9 years ago)
  • catalogmgr/nullvalues.hh

    From f4cd0a116743273a27450e31b1764c3c17290ca2 Mon Sep 17 00:00:00 2001
    From: Dimitar Misev <misev@rasdaman.com>
    Date: Fri, 30 Jan 2015 12:33:55 +0100
    Subject: [PATCH] ticket:888 - make interval long long
    
    ---
     catalogmgr/nullvalues.hh | 20 ++++++++++++++++++++
     conversion/netcdf.cc     |  4 ++--
     raslib/odmgtypes.hh      |  4 ++--
     3 files changed, 24 insertions(+), 4 deletions(-)
    
    diff --git a/catalogmgr/nullvalues.hh b/catalogmgr/nullvalues.hh
    index 79d2ce1..0d74ab7 100644
    a b public:  
    112112        return false;
    113113    }
    114114
     115    inline bool isNull(int value)
     116    {
     117        if (nullValues != NULL && nullValues->within_bounds<int>(value))
     118        {
     119            incCount();
     120            return true;
     121        }
     122        return false;
     123    }
     124
     125    inline bool isNull(unsigned int value)
     126    {
     127        if (nullValues != NULL && nullValues->within_bounds<unsigned int>(value))
     128        {
     129            incCount();
     130            return true;
     131        }
     132        return false;
     133    }
     134
    115135    inline bool isNull(r_Long value)
    116136    {
    117137        if (nullValues != NULL && nullValues->within_bounds<r_Long>(value))
  • conversion/netcdf.cc

    diff --git a/conversion/netcdf.cc b/conversion/netcdf.cc
    index 52f36bd..653b07d 100644
    a b r_convDesc &r_Conv_NETCDF::convertTo(const char *options) throw (r_Error)  
    300300    {
    301301        r_Long *val = (r_Long* &) src;
    302302        NcVar *ncVar = dataFile.add_var(varName, ncInt, dimNo, dims);
    303         ncVar->put(val, dimSizes);
     303        ncVar->put((int*) val, dimSizes);
    304304        break;
    305305    }
    306306    case ctype_uint32:
    r_convDesc &r_Conv_NETCDF::convertTo(const char *options) throw (r_Error)  
    483483                        }
    484484                        r_Long *val = (r_Long*) buff;
    485485                        NcVar *ncVar = dataFile.add_var(varName, ncInt, dimNo, dims);
    486                         ncVar->put(val, dimSizes);
     486                        ncVar->put((int*)val, dimSizes);
    487487                        delete [] buff;
    488488                        break;
    489489                    }
  • raslib/odmgtypes.hh

    diff --git a/raslib/odmgtypes.hh b/raslib/odmgtypes.hh
    index e1809f2..1441bfe 100644
    a b typedef unsigned short r_UShort;  
    9797//@Args: as long (4 bytes)
    9898//@Memo: Module: {\bf rasodmg}.
    9999
    100 typedef int r_Long;
     100typedef long long r_Long;
    101101/**
    102102  {\tt typedef int r_Long;}
    103103*/
    typedef int r_Long;  
    111111//@Args: as unsigned long (4 bytes)
    112112//@Memo: Module: {\bf rasodmg}.
    113113
    114 typedef unsigned int r_ULong;
     114typedef unsigned long long r_ULong;
    115115/**
    116116  {\tt typedef unsigned long r_ULong;}
    117117*/