Skip to content

Commit 2d23daa

Browse files
Opt,ArrayView -> Span以更符合标准语义
1 parent eee7cfd commit 2d23daa

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

UnitTest/UnitTest.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@
194194
</ItemGroup>
195195
<ItemGroup>
196196
<ClInclude Include="..\include\YY\Base\Containers\Array.h" />
197-
<ClInclude Include="..\include\YY\Base\Containers\ArrayView.h" />
197+
<ClInclude Include="..\include\YY\Base\Containers\Span.h" />
198198
<ClInclude Include="..\include\YY\Base\Containers\BitMap.h" />
199199
<ClInclude Include="..\include\YY\Base\Containers\ConstructorPolicy.h" />
200200
<ClInclude Include="..\include\YY\Base\Containers\DoublyLinkedList.h" />

include/YY/Base/Containers/ArrayView.h renamed to include/YY/Base/Containers/Span.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,27 @@ namespace YY
1111
namespace Containers
1212
{
1313
template<typename _Type>
14-
class ArrayView
14+
class Span
1515
{
1616
private:
1717
_Type* pData;
1818
uint_t cData;
1919

2020
public:
21-
ArrayView()
21+
Span()
2222
: pData(nullptr)
2323
, cData(0)
2424
{
2525
}
2626

27-
ArrayView(_Type* _pData, uint_t _cData)
27+
Span(_Type* _pData, uint_t _cData)
2828
: pData(_pData)
2929
, cData(_pData ? _cData : 0)
3030
{
3131
}
3232

3333
template<uint_t _uArrayCount>
34-
ArrayView(_Type (&_Array)[_uArrayCount])
34+
Span(_Type (&_Array)[_uArrayCount])
3535
: pData(_Array)
3636
, cData(_uArrayCount)
3737
{

0 commit comments

Comments
 (0)