Changeset 9376

Show
Ignore:
Timestamp:
12/17/08 12:00:16 (6 years ago)
Author:
robert
Message:

Warning fixes

Location:
OpenSceneGraph/trunk
Files:
18 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/include/osg/GraphicsContext

    r9363 r9376  
    159159                width(0), 
    160160                height(0), 
    161                 colorDepth(0), 
    162                 refreshRate(0) 
     161                refreshRate(0), 
     162                colorDepth(0) 
    163163            {} 
    164164            ScreenSettings(int width, int height, double refreshRate=0, unsigned int colorDepth=0) : 
    165165                width(width), 
    166166                height(height), 
    167                 colorDepth(colorDepth), 
    168                 refreshRate(refreshRate) 
     167                refreshRate(refreshRate), 
     168                colorDepth(colorDepth) 
    169169            {} 
    170170 
  • OpenSceneGraph/trunk/include/osgAnimation/Sampler

    r9093 r9376  
    120120    typedef TemplateSampler<Vec4CubicBezierInterpolator> Vec4CubicBezierSampler; 
    121121   
    122 }; 
     122} 
    123123 
    124124#endif 
  • OpenSceneGraph/trunk/include/osgIntrospection/ConstructorInfo

    r6155 r9376  
    2828    public: 
    2929        // Standard constructor. 
    30         ConstructorInfo(const Type& decltype, const ParameterInfoList& params, std::string briefHelp = std::string(), std::string detailedHelp = std::string()) 
    31         :   _decltype(decltype), 
     30        ConstructorInfo(const Type& declaratiionType, const ParameterInfoList& params, std::string briefHelp = std::string(), std::string detailedHelp = std::string()) 
     31        :   _declarationType(declaratiionType), 
    3232            _params(params), 
    3333            _explicit(false), 
     
    3838 
    3939        // Constructor allowing explicit state specification. 
    40         ConstructorInfo(const Type& decltype, const ParameterInfoList& params, bool isExplicit, std::string briefHelp = std::string(), std::string detailedHelp = std::string()) 
    41         :   _decltype(decltype), 
     40        ConstructorInfo(const Type& declaratiionType, const ParameterInfoList& params, bool isExplicit, std::string briefHelp = std::string(), std::string detailedHelp = std::string()) 
     41        :   _declarationType(declaratiionType), 
    4242            _params(params), 
    4343            _explicit(isExplicit), 
     
    6969        inline const Type& getDeclaringType() const 
    7070        { 
    71             return _decltype; 
     71            return _declarationType; 
    7272        } 
    7373  
     
    9393         
    9494    private: 
    95         const Type& _decltype; 
     95        const Type& _declarationType; 
    9696        ParameterInfoList _params; 
    9797        bool _explicit; 
  • OpenSceneGraph/trunk/include/osgIntrospection/MethodInfo

    r6155 r9376  
    4747 
    4848        /// Direct initialization constructor. 
    49         inline MethodInfo(const std::string& qname, const Type& decltype, const Type& rtype, const ParameterInfoList& plist, VirtualState virtualState, std::string briefHelp = std::string(), std::string detailedHelp = std::string()); 
     49        inline MethodInfo(const std::string& qname, const Type& declarationType, const Type& rtype, const ParameterInfoList& plist, VirtualState virtualState, std::string briefHelp = std::string(), std::string detailedHelp = std::string()); 
    5050 
    5151        /// Direct initialization constructor for static functions (no virtual specifier). 
    52         inline MethodInfo(const std::string& qname, const Type& decltype, const Type& rtype, const ParameterInfoList& plist, std::string briefHelp = std::string(), std::string detailedHelp = std::string()); 
     52        inline MethodInfo(const std::string& qname, const Type& declarationType, const Type& rtype, const ParameterInfoList& plist, std::string briefHelp = std::string(), std::string detailedHelp = std::string()); 
    5353 
    5454        /// Destructor 
     
    120120 
    121121        std::string _name; 
    122         const Type& _decltype; 
     122        const Type& _declarationType; 
    123123        const Type& _rtype; 
    124124        ParameterInfoList _params; 
     
    131131    // INLINE METHODS 
    132132 
    133     inline MethodInfo::MethodInfo(const std::string& qname, const Type& decltype, const Type& rtype, const ParameterInfoList& plist, VirtualState virtualState, std::string briefHelp, std::string detailedHelp) 
     133    inline MethodInfo::MethodInfo(const std::string& qname, const Type& declarationType, const Type& rtype, const ParameterInfoList& plist, VirtualState virtualState, std::string briefHelp, std::string detailedHelp) 
    134134    :   CustomAttributeProvider(), 
    135         _decltype(decltype),  
     135        _declarationType(declarationType),  
    136136        _rtype(rtype), 
    137137        _params(plist), 
     
    143143    } 
    144144 
    145     inline MethodInfo::MethodInfo(const std::string& qname, const Type& decltype, const Type& rtype, const ParameterInfoList& plist, std::string briefHelp, std::string detailedHelp) 
     145    inline MethodInfo::MethodInfo(const std::string& qname, const Type& declarationType, const Type& rtype, const ParameterInfoList& plist, std::string briefHelp, std::string detailedHelp) 
    146146    :   CustomAttributeProvider(), 
    147         _decltype(decltype),  
     147        _declarationType(declarationType),  
    148148        _rtype(rtype), 
    149149        _params(plist), 
     
    170170    inline const Type& MethodInfo::getDeclaringType() const 
    171171    { 
    172         return _decltype; 
     172        return _declarationType; 
    173173    } 
    174174 
  • OpenSceneGraph/trunk/include/osgIntrospection/PropertyInfo

    r7885 r9376  
    5757        /// user is expected to add a custom accessor attribute to this 
    5858        /// PropertyInfo object. 
    59         PropertyInfo(const Type& decltype, const Type& ptype, const std::string& name, const MethodInfo* getm, const MethodInfo* setm, std::string briefHelp = std::string(), std::string detailedHelp = std::string()) 
     59        PropertyInfo(const Type& declaratiionType, const Type& ptype, const std::string& name, const MethodInfo* getm, const MethodInfo* setm, std::string briefHelp = std::string(), std::string detailedHelp = std::string()) 
    6060        :   CustomAttributeProvider(), 
    61             _decltype(decltype), 
     61            _declarationType(declaratiionType), 
    6262            _ptype(ptype), 
    6363            _name(name), 
     
    7979        /// type of the property's value, the property name and the 
    8080        /// getter/setter/counter/adder/insert/remover methods. 
    81         PropertyInfo(const Type& decltype, const Type& ptype, const std::string& name, const MethodInfo* getm, const MethodInfo* setm, const MethodInfo* numm, const MethodInfo* addm, const MethodInfo* insm, const MethodInfo* remm, std::string briefHelp = std::string(), std::string detailedHelp = std::string()) 
     81        PropertyInfo(const Type& declaratiionType, const Type& ptype, const std::string& name, const MethodInfo* getm, const MethodInfo* setm, const MethodInfo* numm, const MethodInfo* addm, const MethodInfo* insm, const MethodInfo* remm, std::string briefHelp = std::string(), std::string detailedHelp = std::string()) 
    8282        :   CustomAttributeProvider(), 
    83             _decltype(decltype), 
     83            _declarationType(declaratiionType), 
    8484            _ptype(ptype), 
    8585            _name(name), 
     
    106106        /// to be indexed. The same is true if the getter is null and the 
    107107        /// setter has more than one parameter. 
    108         PropertyInfo(const Type& decltype, const Type& ptype, const std::string& name, const MethodInfo* getm, const MethodInfo* setm, const MethodInfo* remm, std::string briefHelp = std::string(), std::string detailedHelp = std::string()) 
     108        PropertyInfo(const Type& declaratiionType, const Type& ptype, const std::string& name, const MethodInfo* getm, const MethodInfo* setm, const MethodInfo* remm, std::string briefHelp = std::string(), std::string detailedHelp = std::string()) 
    109109        :   CustomAttributeProvider(), 
    110             _decltype(decltype), 
     110            _declarationType(declaratiionType), 
    111111            _ptype(ptype), 
    112112            _name(name), 
     
    162162        inline virtual const Type& getDeclaringType() const 
    163163        { 
    164             return _decltype; 
     164            return _declarationType; 
    165165        } 
    166166 
     
    361361 
    362362    private: 
    363         const Type& _decltype; 
     363        const Type& _declarationType; 
    364364        const Type& _ptype; 
    365365        std::string _name; 
  • OpenSceneGraph/trunk/include/osgShadow/MinimalDrawBoundsShadowMap

    r9113 r9376  
    119119 
    120120        protected: 
     121            osg::observer_ptr< ViewData >     _vd; 
    121122            osg::ref_ptr< osg::NodeCallback > _nc; 
    122             osg::observer_ptr< ViewData >     _vd; 
    123123        }; 
    124124}; 
  • OpenSceneGraph/trunk/src/osg/Camera.cpp

    r9239 r9376  
    286286        } 
    287287        break; 
     288    default: 
     289        break; 
    288290    } 
    289291    _bufferAttachmentMap[buffer]._internalFormat = internalFormat; 
  • OpenSceneGraph/trunk/src/osg/OcclusionQueryNode.cpp

    r8974 r9376  
    597597        OpenThreads::ScopedLock<OpenThreads::Mutex> lock( _frameCountMutex ); 
    598598        int& lastQueryFrame = _frameCountMap[ camera ]; 
    599         if ( issueQuery = (curFrame - lastQueryFrame >= _queryFrameCount) ) 
     599        issueQuery = (curFrame - lastQueryFrame >= _queryFrameCount); 
     600        if (issueQuery) 
    600601            lastQueryFrame = curFrame; 
    601602    } 
  • OpenSceneGraph/trunk/src/osgIntrospection/ConstructorInfo.cpp

    r5328 r9376  
    1919void ConstructorInfo::getInheritedProviders(CustomAttributeProviderList& providers) const 
    2020{ 
    21     for (int i=0; i<_decltype.getNumBaseTypes(); ++i) 
     21    for (int i=0; i<_declarationType.getNumBaseTypes(); ++i) 
    2222    { 
    23         const ConstructorInfo* ci = _decltype.getBaseType(i).getConstructor(_params); 
     23        const ConstructorInfo* ci = _declarationType.getBaseType(i).getConstructor(_params); 
    2424        if (ci) 
    2525        { 
  • OpenSceneGraph/trunk/src/osgIntrospection/MethodInfo.cpp

    r5328 r9376  
    1919void MethodInfo::getInheritedProviders(CustomAttributeProviderList& providers) const 
    2020{ 
    21     for (int i=0; i<_decltype.getNumBaseTypes(); ++i) 
     21    for (int i=0; i<_declarationType.getNumBaseTypes(); ++i) 
    2222    { 
    23         const MethodInfo* mi = _decltype.getBaseType(i).getMethod(_name, _params, false); 
     23        const MethodInfo* mi = _declarationType.getBaseType(i).getMethod(_name, _params, false); 
    2424        if (mi) 
    2525        { 
     
    3232{ 
    3333    if (isConst() != other->isConst()) return false; 
    34     if (_decltype != other->_decltype) return false; 
     34    if (_declarationType != other->_declarationType) return false; 
    3535    if (_rtype != other->_rtype) return false; 
    3636    if (_name != other->_name) return false; 
  • OpenSceneGraph/trunk/src/osgIntrospection/PropertyInfo.cpp

    r5655 r9376  
    2121void PropertyInfo::getInheritedProviders(CustomAttributeProviderList& providers) const 
    2222{ 
    23     for (int i=0; i<_decltype.getNumBaseTypes(); ++i) 
    24     { 
    25         const PropertyInfo* pi = _decltype.getBaseType(i).getProperty(_name, _ptype, getIndexParameters(), false); 
     23    for (int i=0; i<_declarationType.getNumBaseTypes(); ++i) 
     24    { 
     25        const PropertyInfo* pi = _declarationType.getBaseType(i).getProperty(_name, _ptype, getIndexParameters(), false); 
    2626        if (pi) 
    2727        { 
     
    4444 
    4545    if (!_getm) 
    46         throw PropertyAccessException(_decltype.getQualifiedName() + "::" + _name, PropertyAccessException::GET); 
     46        throw PropertyAccessException(_declarationType.getQualifiedName() + "::" + _name, PropertyAccessException::GET); 
    4747 
    4848    if (pta) 
     
    6464 
    6565    if (!_getm) 
    66         throw PropertyAccessException(_decltype.getQualifiedName() + "::" + _name, PropertyAccessException::GET); 
     66        throw PropertyAccessException(_declarationType.getQualifiedName() + "::" + _name, PropertyAccessException::GET); 
    6767 
    6868    if (pta) 
     
    8282 
    8383    if (!_setm) 
    84         throw PropertyAccessException(_decltype.getQualifiedName() + "::" + _name, PropertyAccessException::SET); 
     84        throw PropertyAccessException(_declarationType.getQualifiedName() + "::" + _name, PropertyAccessException::SET); 
    8585 
    8686    ValueList args; 
     
    102102 
    103103    if (!_getm)  
    104         throw PropertyAccessException(_decltype.getQualifiedName() + "::" + _name, PropertyAccessException::IGET); 
     104        throw PropertyAccessException(_declarationType.getQualifiedName() + "::" + _name, PropertyAccessException::IGET); 
    105105 
    106106    if (pta) 
     
    122122 
    123123    if (!_getm)  
    124         throw PropertyAccessException(_decltype.getQualifiedName() + "::" + _name, PropertyAccessException::IGET); 
     124        throw PropertyAccessException(_declarationType.getQualifiedName() + "::" + _name, PropertyAccessException::IGET); 
    125125 
    126126    if (pta) 
     
    139139 
    140140    if (!_setm)  
    141         throw PropertyAccessException(_decltype.getQualifiedName() + "::" + _name, PropertyAccessException::ISET); 
     141        throw PropertyAccessException(_declarationType.getQualifiedName() + "::" + _name, PropertyAccessException::ISET); 
    142142 
    143143    ValueList tmpArgs(args); 
     
    152152 
    153153    if (!_numm) 
    154         throw PropertyAccessException(_decltype.getQualifiedName() + "::" + _name, PropertyAccessException::COUNT); 
     154        throw PropertyAccessException(_declarationType.getQualifiedName() + "::" + _name, PropertyAccessException::COUNT); 
    155155 
    156156    return variant_cast<int>(_numm->invoke(instance)); 
     
    170170 
    171171    if (!_getm)  
    172         throw PropertyAccessException(_decltype.getQualifiedName() + "::" + _name, PropertyAccessException::AGET); 
     172        throw PropertyAccessException(_declarationType.getQualifiedName() + "::" + _name, PropertyAccessException::AGET); 
    173173 
    174174    ValueList args; 
     
    193193 
    194194    if (!_getm)  
    195         throw PropertyAccessException(_decltype.getQualifiedName() + "::" + _name, PropertyAccessException::AGET); 
     195        throw PropertyAccessException(_declarationType.getQualifiedName() + "::" + _name, PropertyAccessException::AGET); 
    196196 
    197197    ValueList args; 
     
    213213     
    214214    if (!_setm)  
    215         throw PropertyAccessException(_decltype.getQualifiedName() + "::" + _name, PropertyAccessException::ASET); 
     215        throw PropertyAccessException(_declarationType.getQualifiedName() + "::" + _name, PropertyAccessException::ASET); 
    216216 
    217217    ValueList args; 
     
    231231 
    232232    if (!_addm)  
    233         throw PropertyAccessException(_decltype.getQualifiedName() + "::" + _name, PropertyAccessException::ADD); 
     233        throw PropertyAccessException(_declarationType.getQualifiedName() + "::" + _name, PropertyAccessException::ADD); 
    234234 
    235235    ValueList args; 
     
    248248 
    249249    if (!_addm)  
    250         throw PropertyAccessException(_decltype.getQualifiedName() + "::" + _name, PropertyAccessException::INSERT); 
     250        throw PropertyAccessException(_declarationType.getQualifiedName() + "::" + _name, PropertyAccessException::INSERT); 
    251251 
    252252    ValueList args; 
     
    266266 
    267267    if (!_remm)  
    268         throw PropertyAccessException(_decltype.getQualifiedName() + "::" + _name, PropertyAccessException::REMOVE); 
     268        throw PropertyAccessException(_declarationType.getQualifiedName() + "::" + _name, PropertyAccessException::REMOVE); 
    269269 
    270270    ValueList args; 
     
    290290    } 
    291291 
    292     if (_decltype.isAbstract())  
     292    if (_declarationType.isAbstract())  
    293293    { 
    294294        if (_ptype.isAbstract() || !_ptype.isDefined()) 
     
    298298 
    299299    // auto default value 
    300     Value instance = _decltype.createInstance(); 
     300    Value instance = _declarationType.createInstance(); 
    301301    return getValue(instance); 
    302302} 
     
    361361 
    362362    if (!_remm)  
    363         throw PropertyAccessException(_decltype.getQualifiedName() + "::" + _name, PropertyAccessException::REMOVE); 
     363        throw PropertyAccessException(_declarationType.getQualifiedName() + "::" + _name, PropertyAccessException::REMOVE); 
    364364 
    365365    _remm->invoke(instance, args);     
  • OpenSceneGraph/trunk/src/osgShadow/ConvexPolyhedron.cpp

    r9343 r9376  
    996996        osg::Vec3d vc = face.vertices[(i+2)%face.vertices.size()]; 
    997997 
     998 
     999#if ( CONVEX_POLYHEDRON_WARN_ON_INCOHERENT_DATA  > 1 || CONVEX_POLYHEDRON_WARN_ON_CONCAVE_POLYGON ) 
    9981000        double dist = fabs( face.plane.distance( va ) ); 
    999  
    1000 #if ( CONVEX_POLYHEDRON_WARN_ON_INCOHERENT_DATA  > 1 || CONVEX_POLYHEDRON_WARN_ON_CONCAVE_POLYGON ) 
    10011001        if( dist > 0.0001 ) 
    10021002        { 
     
    10261026        return 0; 
    10271027 
    1028     if( negative + colinear == face.vertices.size() ) 
     1028    if( (negative + colinear) == static_cast<int>(face.vertices.size()) ) 
    10291029        return -( negative + colinear ); 
    10301030 
    1031     if( positive + colinear == face.vertices.size() ) 
     1031    if( (positive + colinear) == static_cast<int>(face.vertices.size()) ) 
    10321032        return +( positive + colinear ); 
    10331033 
     
    16001600#endif 
    16011601            //Select orthogonal faces and vertices appropriate for offseting 
    1602             if( dotOffset0 == 0.0 && dotOffset1 < 0.0 || 
    1603                 dotOffset1 == 0.0 && dotOffset0 < 0.0 ) 
     1602            if( (dotOffset0 == 0.0 && dotOffset1 < 0.0) || 
     1603                (dotOffset1 == 0.0 && dotOffset0 < 0.0) ) 
    16041604            { 
    16051605                Face * face = ( dotOffset0 == 0 ? edgeFaces[0] : edgeFaces[1] ); 
     
    16071607            } 
    16081608 
    1609             if( dotOffset0 < 0.0 && dotOffset1 > 0.0 || 
    1610                 dotOffset1 < 0.0 && dotOffset0 > 0.0 ) 
     1609            if( (dotOffset0 < 0.0 && dotOffset1 > 0.0) || 
     1610                (dotOffset1 < 0.0 && dotOffset0 > 0.0) ) 
    16111611            { 
    16121612                Face & face = createFace(); 
  • OpenSceneGraph/trunk/src/osgShadow/DebugShadowMap.cpp

    r8989 r9376  
    3737DebugShadowMap::DebugShadowMap():  
    3838    BaseClass(), 
    39     _doDebugDraw( false ), 
    4039    _hudSize( 2, 2 ), 
    4140    _hudOrigin( -1, -1 ), 
     
    4342    _viewportOrigin( DEFAULT_DEBUG_HUD_ORIGIN_X, DEFAULT_DEBUG_HUD_ORIGIN_Y ),  
    4443    _orthoSize( 2, 2 ), 
    45     _orthoOrigin( -1, -1 ) 
     44    _orthoOrigin( -1, -1 ), 
     45    _doDebugDraw( false ) 
    4646{ 
    4747     
     
    105105(const DebugShadowMap& copy, const osg::CopyOp& copyop) : 
    106106    BaseClass(copy,copyop), 
    107     _doDebugDraw( copy._doDebugDraw ), 
    108107    _hudSize( copy._hudSize ), 
    109108    _hudOrigin( copy._hudOrigin ), 
     
    111110    _viewportOrigin( copy._viewportOrigin ),  
    112111    _orthoSize( copy._viewportOrigin ), 
    113     _orthoOrigin( copy._viewportOrigin ) 
     112    _orthoOrigin( copy._viewportOrigin ), 
     113    _doDebugDraw( copy._doDebugDraw ) 
    114114{ 
    115115    if( copy._depthColorFragmentShader.valid() ) 
     
    227227    if( &polytope == NULL ) { // delete         
    228228        PolytopeGeometry & pg = _polytopeGeometryMap[ std::string( name ) ]; 
    229         for( int i = 0; i < VECTOR_LENGTH( pg._geometry ) ; i++ ) 
     229        for( unsigned int i = 0; i < VECTOR_LENGTH( pg._geometry ) ; i++ ) 
    230230        { 
    231231            if( pg._geometry[i].valid() ) { 
     
    247247            pg._colorInside = colorInside; 
    248248 
    249         for( int i = 0; i < VECTOR_LENGTH( pg._geometry ) ; i++ ) 
     249        for( unsigned int i = 0; i < VECTOR_LENGTH( pg._geometry ) ; i++ ) 
    250250        { 
    251251            if( !pg._geometry[i].valid() ) { 
     
    275275    const int num = 2; // = VECTOR_LENGTH( PolytopeGeometry::_geometry ); 
    276276     
    277     const osg::Camera *camera[2] = { viewCam, shadowCam }; 
    278  
    279277    osg::Matrix     
    280278        transform[ num ] =  
  • OpenSceneGraph/trunk/src/osgShadow/MinimalCullBoundsShadowMap.cpp

    r8984 r9376  
    137137      return !b || 
    138138             a->_projection < b->_projection ||  
    139              a->_projection == b->_projection && a->_modelview < b->_modelview; 
     139             (a->_projection == b->_projection && a->_modelview < b->_modelview); 
    140140  } 
    141141}; 
     
    314314    osg::ref_ptr< osg::RefMatrix > modelview; 
    315315    osg::ref_ptr< osg::RefMatrix > projection; 
    316     osg::Matrix viewToWorld, modelToWorld, *ptrProjection = NULL, 
    317                 *ptrViewToWorld = &projectionToWorld, *ptrModelToWorld; 
     316    osg::Matrix viewToWorld, modelToWorld, 
     317                *ptrProjection = NULL, 
     318                *ptrViewToWorld = &projectionToWorld,  
     319                *ptrModelToWorld = NULL; 
    318320 
    319321    // compute bounding boxes but skip old ones (placed at the end as NULLs) 
  • OpenSceneGraph/trunk/src/osgShadow/MinimalDrawBoundsShadowMap.cpp

    r8989 r9376  
    149149        unsigned char * pb = (unsigned char *)image->data(); 
    150150 
    151         float scale = 1.f / 254, bias = 0.5f; 
     151        float scale = 1.f / 254; 
    152152        for( int y = 0; y < image->t(); y++ ) { 
    153153            float fY = ( 0.5f + y ) / image->t(); 
  • OpenSceneGraph/trunk/src/osgTerrain/Layer.cpp

    r9037 r9376  
    572572{ 
    573573    if (_implementation.valid()) _implementation->setModifiedCount(value); 
    574 }; 
     574} 
    575575 
    576576unsigned int ProxyLayer::getModifiedCount() const 
  • OpenSceneGraph/trunk/src/osgText/Font.cpp

    r9343 r9376  
    667667         
    668668        if (s_renderer &&  
    669             (strstr((const char*)s_renderer,"Radeon")!=0) ||  
     669            ((strstr((const char*)s_renderer,"Radeon")!=0) ||  
    670670            (strstr((const char*)s_renderer,"RADEON")!=0) || 
    671             (strstr((const char*)s_renderer,"ALL-IN-WONDER")!=0)) 
     671            (strstr((const char*)s_renderer,"ALL-IN-WONDER")!=0))) 
    672672        { 
    673673            // we're running on an ATI, so need to work around its 
  • OpenSceneGraph/trunk/src/osgText/String.cpp

    r7648 r9376  
    305305        { 
    306306            utf8string+=(char)(0xc0 | (currentChar>>6)); 
    307             utf8string+=(char)(0x80 | currentChar & 0x3f); 
     307            utf8string+=(char)(0x80 | (currentChar & 0x3f)); 
    308308        } 
    309309        else 
    310310        { 
    311311            utf8string+=(char)(0xe0 | (currentChar>>12)); 
    312             utf8string+=(char)(0x80 | (currentChar>>6) & 0x3f); 
    313             utf8string+=(char)(0x80 | currentChar & 0x3f); 
     312            utf8string+=(char)(0x80 | ((currentChar>>6) & 0x3f)); 
     313            utf8string+=(char)(0x80 | (currentChar & 0x3f)); 
    314314        } 
    315315    }