chore
把非utf8-bom编码的cpp/h文件改为 utf8 bom 编码, msvc识别utf8编码时,如果不是bom格式的,会使用当前cp_oem来解码.
This commit is contained in:
1 parent
2b0c2055ff
commit
164968b62e
6171 files changed
+191244
-191243
No files matched your search
@@ -1,4 +1,4 @@
|
||||
#include "StdAfx.h"
|
||||
#include "StdAfx.h"
|
||||
#include "subdmesh.h"
|
||||
|
||||
#pragma region SubDMesh
|
||||
@@ -29,8 +29,8 @@ bool SubDMesh::subDMesh2Buffer(const AcArray<Adesk::Int32> &faces
|
||||
, Adesk::UInt32 &nOutLen)
|
||||
{
|
||||
/*
|
||||
内存块结构如下:
|
||||
face索引个数 | faces数据 | 点个数 | pts数据 | 点个数 | pts2d数据
|
||||
内存块结构如下:
|
||||
face索引个数 | faces数据 | 点个数 | pts数据 | 点个数 | pts2d数据
|
||||
*/
|
||||
Pnt pnt;
|
||||
std::vector<Pnt> vpts(0), vpts2d(0);
|
||||
@@ -39,7 +39,7 @@ bool SubDMesh::subDMesh2Buffer(const AcArray<Adesk::Int32> &faces
|
||||
const void *pPntStart(NULL), *pPntStart2d(NULL);
|
||||
|
||||
if (sizeof(AcGePoint3d) != sizeof(Pnt))
|
||||
{ // AcGePoint3d内存在虚函数,用Pnt结构代替
|
||||
{ // AcGePoint3d内存在虚函数,用Pnt结构代替
|
||||
PntSize = sizeof(Pnt);
|
||||
|
||||
for (int i = 0; i < pts.length(); ++i)
|
||||
@@ -63,7 +63,7 @@ bool SubDMesh::subDMesh2Buffer(const AcArray<Adesk::Int32> &faces
|
||||
pPntStart2d = &vpts2d[0];
|
||||
}
|
||||
else
|
||||
{ // 不存在,直接用
|
||||
{ // 不存在,直接用
|
||||
PntSize = sizeof(AcGePoint3d);
|
||||
pPntStart = pts.isEmpty() ? NULL : &pts[0];
|
||||
pPntStart2d = pts2d.isEmpty() ? NULL : &pts2d[0];
|
||||
@@ -144,17 +144,17 @@ bool SubDMesh::Buffer2SubDMesh(void *pBuffer
|
||||
|
||||
int count(0);
|
||||
|
||||
// 先取faces长度
|
||||
// 先取faces长度
|
||||
COPY_MEMERY(sizeof(int), &count);
|
||||
faces.setLogicalLength(count);
|
||||
|
||||
// 再取faces数据
|
||||
// 再取faces数据
|
||||
if (count)
|
||||
{
|
||||
COPY_MEMERY(count * sizeof(Adesk::Int32), &faces[0]);
|
||||
}
|
||||
|
||||
// 取pts长度
|
||||
// 取pts长度
|
||||
COPY_MEMERY(sizeof(int), &count);
|
||||
|
||||
if (sizeof(AcGePoint3d) != sizeof(Pnt))
|
||||
@@ -179,7 +179,7 @@ bool SubDMesh::Buffer2SubDMesh(void *pBuffer
|
||||
}
|
||||
}
|
||||
|
||||
// 取pts2d长度
|
||||
// 取pts2d长度
|
||||
COPY_MEMERY(sizeof(int), &count);
|
||||
|
||||
if (sizeof(AcGePoint3d) != sizeof(Pnt))
|
||||
|
||||
Reference in new issue
Block a user