Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 11, 2010, 11:34:20 AM (15 years ago)
Author:
rgrieder
Message:

Removed a ton of msvc warnings revealed with OGRE v1.7 (they removed the warning suppressors in OgrePrerequisites.h).
All of them are conversions from one type to another that might be lossy (mostly double to float, please always use "3.7f" instead of "3.7" as constants when using floats).

Location:
code/trunk/src/orxonox/sound
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/sound/BaseSound.cc

    r6417 r6502  
    178178    void BaseSound::setPitch(float pitch)
    179179    {
    180         if (pitch > 2 || pitch < 0.5)
     180        if (pitch > 2 || pitch < 0.5f)
    181181        {
    182182            COUT(2) << "Sound warning: pitch out of range, cropping value." << std::endl;
    183             pitch = pitch > 2 ? 2 : pitch;
    184             pitch = pitch < 0.5 ? 0.5 : pitch;
     183            pitch = pitch > 2.0f ? 2.0f : pitch;
     184            pitch = pitch < 0.5f ? 0.5f : pitch;
    185185        }
    186186        this->pitch_ = pitch;
  • code/trunk/src/orxonox/sound/SoundBuffer.cc

    r6417 r6502  
    108108        {
    109109        case SEEK_SET:
    110             stream->seek(offset);
     110            stream->seek((size_t)offset);
    111111            break;
    112112        case SEEK_CUR:
    113             stream->skip(offset);
     113            stream->skip((size_t)offset);
    114114            break;
    115115        case SEEK_END:
    116             stream->seek(stream->size() + offset);
     116            stream->seek(stream->size() + (size_t)offset);
    117117            break;
    118118        default:
Note: See TracChangeset for help on using the changeset viewer.