Changeset 2806


Ignore:
Timestamp:
Jul 20, 2013, 4:18:23 PM (4 years ago)
Author:
lolbot
Message:

fixed 7 files out of 2745:

  • removed 0 CR characters
  • removed 21 trailing whitespaces
  • replaced 42 tabs with spaces
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gpu/shader.cpp

    r2805 r2806  
    6161#elif !defined __CELLOS_LV2__
    6262    GLuint prog_id, vert_id, frag_id;
    63         // Benlitz: using a simple array could be faster since there is never more than a few attribute locations to store
    64         Map<String, GLint> attrib_locations;
     63    // Benlitz: using a simple array could be faster since there is never more than a few attribute locations to store
     64    Map<String, GLint> attrib_locations;
    6565#else
    6666    CGprogram vert_id, frag_id;
     
    335335#if defined USE_D3D9 || defined _XBOX
    336336#elif !defined __CELLOS_LV2__
    337         GLint l;
    338        
    339         if (!data->attrib_locations.TryGetValue(attr, l))
    340         {
    341                 l = glGetAttribLocation(data->prog_id, attr);
    342                 if (l < 0)
    343                 {
    344                         Log::Warn("tried to query invalid attribute: %s\n", attr);
    345                         l = 0;
    346                 }
    347                 else
    348                 {
    349                         data->attrib_locations[String(attr)] = l;
    350                 }
    351         }
     337    GLint l;
     338
     339    if (!data->attrib_locations.TryGetValue(attr, l))
     340    {
     341        l = glGetAttribLocation(data->prog_id, attr);
     342        if (l < 0)
     343        {
     344            Log::Warn("tried to query invalid attribute: %s\n", attr);
     345            l = 0;
     346        }
     347        else
     348        {
     349            data->attrib_locations[String(attr)] = l;
     350        }
     351    }
    352352    ret.m_flags |= (uint64_t)(uint32_t)l << 32;
    353353#else
  • trunk/src/lol/base/map.h

    r2776 r2806  
    2525{
    2626public:
    27         /* If E is different from K, Hash<K> must implement operator()(E const&)
     27    /* If E is different from K, Hash<K> must implement operator()(E const&)
    2828     * and an equality operator between K and E must exist in order to use this method.
    2929      */
     
    3131    /* I choose to make this inline because passing the key by reference
    3232     * is usually suboptimal. */
    33         template <typename E>
     33    template <typename E>
    3434    inline V const& operator[] (E const &key) const
    3535    {
     
    4545    }
    4646
    47         template <typename E>
     47    template <typename E>
    4848    inline V & operator[] (E const &key)
    4949    {
     
    5959    }
    6060
    61         template <typename E>
     61    template <typename E>
    6262    inline void Remove(E const &key)
    6363    {
     
    7272    }
    7373
    74         template <typename E>
     74    template <typename E>
    7575    inline bool HasKey(E const &key)
    7676    {
     
    8383    }
    8484
    85         template <typename E>
     85    template <typename E>
    8686    inline bool TryGetValue(E const &key, V& value)
    8787    {
  • trunk/src/lol/gpu/texture.h

    r2758 r2806  
    101101    void SetMagFiltering(TextureMagFilter filter);
    102102    void SetMinFiltering(TextureMinFilter filter);
    103         void GenerateMipmaps();
     103    void GenerateMipmaps();
    104104
    105105    ShaderTexture GetTexture() const;
  • trunk/src/lol/math/vector.h

    r2749 r2806  
    17931793    static Mat4<T> perspective(T fov_y, T width, T height, T near, T far);
    17941794    static Mat4<T> shifted_perspective(T fov_y, T screen_size, T screen_ratio_xy, T draw_distance);
    1795    
     1795
    17961796    void printf() const;
    17971797
  • trunk/test/meshviewer.cpp

    r2772 r2806  
    275275
    276276        vec3 cam_center = cam_min_max[0] + min_max_diff * .5f;
    277        
     277
    278278        vec4 test = inverse(world_cam) * vec4(.0f,.0f,-1.0f,1.f);
    279279        test = test;
  • trunk/test/unit/string.cpp

    r2759 r2806  
    124124    }
    125125
    126         LOLUNIT_TEST(StringCharsEqual)
    127     {
    128                 char const* sz = "abc";
     126    LOLUNIT_TEST(StringCharsEqual)
     127    {
     128        char const* sz = "abc";
    129129        String s1("abc");
    130130        String s2("ab");
     
    136136    }
    137137
    138         LOLUNIT_TEST(StringCharsDifferent)
    139     {
    140                 char const* sz = "abc";
     138    LOLUNIT_TEST(StringCharsDifferent)
     139    {
     140        char const* sz = "abc";
    141141        String s1("ab");
    142142        String s2("abc");
Note: See TracChangeset for help on using the changeset viewer.