瀏覽代碼

base: work around an annoying GCC warning we very well know about.

legacy
Sam Hocevar sam 11 年之前
父節點
當前提交
6d7535f842
共有 2 個檔案被更改,包括 2 行新增2 行删除
  1. +1
    -1
      src/lol/base/array.h
  2. +1
    -1
      src/lol/base/string.h

+ 1
- 1
src/lol/base/array.h 查看文件

@@ -119,7 +119,7 @@ public:
/* Allow array[0] even if size is zero so that people can
* always use &array[0] to get a pointer to the data. */
ASSERT(n >= 0);
ASSERT(n < m_count || (!n && !m_count));
ASSERT((unsigned)n < (unsigned)m_count || (!n && !m_count));
return m_data[n];
}



+ 1
- 1
src/lol/base/string.h 查看文件

@@ -67,7 +67,7 @@ public:
/* Allow n == Count() because we might have reasonable reasons
* to access that hidden null character. */
ASSERT(n >= 0);
ASSERT(n <= Count());
ASSERT((unsigned)n <= (unsigned)Count());
return ((Super &)*this)[n];
}



Loading…
取消
儲存