No longer include llerrorlegacy.h. Updated llstl to include deletion utilites.

This commit is contained in:
Shyotl
2015-06-19 03:54:20 -05:00
parent 283f5298d5
commit 1c627317ec
634 changed files with 8200 additions and 12214 deletions

View File

@@ -169,13 +169,13 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
if ( !get_dom_sources(inputs, pos_offset, tc_offset, norm_offset, idx_stride, pos_source, tc_source, norm_source) || !pos_source )
{
llwarns << "Could not find dom sources for basic geo data; invalid model." << llendl;
LL_WARNS() << "Could not find dom sources for basic geo data; invalid model." << LL_ENDL;
return LLModel::BAD_ELEMENT;
}
if (!pos_source)
{
llwarns << "Unable to process mesh without position data; invalid model; invalid model." << llendl;
LL_WARNS() << "Unable to process mesh without position data; invalid model; invalid model." << LL_ENDL;
return LLModel::BAD_ELEMENT;
}
@@ -196,7 +196,7 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
if (vertex_count == 0)
{
llwarns << "Unable to process mesh with empty position array; invalid model." << llendl;
LL_WARNS() << "Unable to process mesh with empty position array; invalid model." << LL_ENDL;
return LLModel::BAD_ELEMENT;
}
@@ -213,7 +213,7 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
if (((i + pos_offset) > index_count)
|| ((idx[i+pos_offset]*3+2) > vertex_count))
{
llwarns << "Out of range index data; invalid model." << llendl;
LL_WARNS() << "Out of range index data; invalid model." << LL_ENDL;
return LLModel::BAD_ELEMENT;
}
@@ -223,7 +223,7 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
if (!cv.getPosition().isFinite3())
{
llwarns << "Nan positional data, invalid model." << llendl;
LL_WARNS() << "Nan positional data, invalid model." << LL_ENDL;
return LLModel::BAD_ELEMENT;
}
}
@@ -236,7 +236,7 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
if (((i + tc_offset) > index_count)
|| ((idx[i+tc_offset]*2+1) > tc_count))
{
llwarns << "Out of range TC indices." << llendl;
LL_WARNS() << "Out of range TC indices." << LL_ENDL;
return LLModel::BAD_ELEMENT;
}
@@ -245,7 +245,7 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
if (!cv.mTexCoord.isFinite())
{
llwarns << "Found NaN while loading tex coords from DAE-Model, invalid model." << llendl;
LL_WARNS() << "Found NaN while loading tex coords from DAE-Model, invalid model." << LL_ENDL;
return LLModel::BAD_ELEMENT;
}
}
@@ -257,7 +257,7 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
if (((i + norm_offset) > index_count)
|| ((idx[i+norm_offset]*3+2) > norm_count))
{
llwarns << "Found out of range norm indices, invalid model." << llendl;
LL_WARNS() << "Found out of range norm indices, invalid model." << LL_ENDL;
return LLModel::BAD_ELEMENT;
}
@@ -267,7 +267,7 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
if (!cv.getNormal().isFinite3())
{
llwarns << "Found NaN while loading normals from DAE-Model, invalid model." << llendl;
LL_WARNS() << "Found NaN while loading normals from DAE-Model, invalid model." << LL_ENDL;
return LLModel::BAD_ELEMENT;
}
}
@@ -296,7 +296,7 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
verts.push_back(cv);
if (verts.size() >= 65535)
{
//llerrs << "Attempted to write model exceeding 16-bit index buffer limitation." << llendl;
//LL_ERRS() << "Attempted to write model exceeding 16-bit index buffer limitation." << LL_ENDL;
return LLModel::VERTEX_NUMBER_OVERFLOW ;
}
U16 index = (U16) (verts.size()-1);
@@ -396,7 +396,7 @@ LLModel::EModelStatus load_face_from_dom_polylist(std::vector<LLVolumeFace>& fac
if (!get_dom_sources(inputs, pos_offset, tc_offset, norm_offset, idx_stride, pos_source, tc_source, norm_source))
{
llwarns << "Could not get DOM sources for basic geo data, invalid model." << llendl;
LL_WARNS() << "Could not get DOM sources for basic geo data, invalid model." << LL_ENDL;
return LLModel::BAD_ELEMENT;
}
@@ -450,7 +450,7 @@ LLModel::EModelStatus load_face_from_dom_polylist(std::vector<LLVolumeFace>& fac
if (((cur_idx + pos_offset) > index_count)
|| ((idx[cur_idx+pos_offset]*3+2) > vertex_count))
{
llwarns << "Out of range position indices, invalid model." << llendl;
LL_WARNS() << "Out of range position indices, invalid model." << LL_ENDL;
return LLModel::BAD_ELEMENT;
}
@@ -460,7 +460,7 @@ LLModel::EModelStatus load_face_from_dom_polylist(std::vector<LLVolumeFace>& fac
if (!cv.getPosition().isFinite3())
{
llwarns << "Found NaN while loading positions from DAE-Model, invalid model." << llendl;
LL_WARNS() << "Found NaN while loading positions from DAE-Model, invalid model." << LL_ENDL;
return LLModel::BAD_ELEMENT;
}
@@ -473,7 +473,7 @@ LLModel::EModelStatus load_face_from_dom_polylist(std::vector<LLVolumeFace>& fac
if (((cur_idx + tc_offset) > index_count)
|| ((idx[cur_idx+tc_offset]*2+1) > tc_count))
{
llwarns << "Out of range TC indices, invalid model." << llendl;
LL_WARNS() << "Out of range TC indices, invalid model." << LL_ENDL;
return LLModel::BAD_ELEMENT;
}
@@ -482,7 +482,7 @@ LLModel::EModelStatus load_face_from_dom_polylist(std::vector<LLVolumeFace>& fac
if (!cv.mTexCoord.isFinite())
{
llwarns << "Found NaN while loading tex coords from DAE-Model, invalid model." << llendl;
LL_WARNS() << "Found NaN while loading tex coords from DAE-Model, invalid model." << LL_ENDL;
return LLModel::BAD_ELEMENT;
}
}
@@ -494,7 +494,7 @@ LLModel::EModelStatus load_face_from_dom_polylist(std::vector<LLVolumeFace>& fac
if (((cur_idx + norm_offset) > index_count)
|| ((idx[cur_idx+norm_offset]*3+2) > norm_count))
{
llwarns << "Out of range norm indices, invalid model." << llendl;
LL_WARNS() << "Out of range norm indices, invalid model." << LL_ENDL;
return LLModel::BAD_ELEMENT;
}
@@ -504,7 +504,7 @@ LLModel::EModelStatus load_face_from_dom_polylist(std::vector<LLVolumeFace>& fac
if (!cv.getNormal().isFinite3())
{
llwarns << "Found NaN while loading normals from DAE-Model, invalid model." << llendl;
LL_WARNS() << "Found NaN while loading normals from DAE-Model, invalid model." << LL_ENDL;
return LLModel::BAD_ELEMENT;
}
}
@@ -552,7 +552,7 @@ LLModel::EModelStatus load_face_from_dom_polylist(std::vector<LLVolumeFace>& fac
verts.push_back(cv);
if (verts.size() >= 65535)
{
//llerrs << "Attempted to write model exceeding 16-bit index buffer limitation." << llendl;
//LL_ERRS() << "Attempted to write model exceeding 16-bit index buffer limitation." << LL_ENDL;
return LLModel::VERTEX_NUMBER_OVERFLOW ;
}
U16 index = (U16) (verts.size()-1);
@@ -673,7 +673,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
domVertices* vertices = (domVertices*) elem.cast();
if (!vertices)
{
llwarns << "Could not find vertex source, invalid model." << llendl;
LL_WARNS() << "Could not find vertex source, invalid model." << LL_ENDL;
return LLModel::BAD_ELEMENT;
}
domInputLocal_Array& v_inp = vertices->getInput_array();
@@ -687,7 +687,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
domSource* src = (domSource*) elem.cast();
if (!src)
{
llwarns << "Could not find DOM source, invalid model." << llendl;
LL_WARNS() << "Could not find DOM source, invalid model." << LL_ENDL;
return LLModel::BAD_ELEMENT;
}
v = &(src->getFloat_array()->getValue());
@@ -703,7 +703,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
domSource* src = (domSource*) elem.cast();
if (!src)
{
llwarns << "Could not find DOM source, invalid model." << llendl;
LL_WARNS() << "Could not find DOM source, invalid model." << LL_ENDL;
return LLModel::BAD_ELEMENT;
}
n = &(src->getFloat_array()->getValue());
@@ -716,7 +716,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
domSource* src = (domSource*) elem.cast();
if (!src)
{
llwarns << "Could not find DOM source, invalid model." << llendl;
LL_WARNS() << "Could not find DOM source, invalid model." << LL_ENDL;
return LLModel::BAD_ELEMENT;
}
t = &(src->getFloat_array()->getValue());
@@ -754,7 +754,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
if (!vert.getPosition().isFinite3())
{
llwarns << "Found NaN while loading position data from DAE-Model, invalid model." << llendl;
LL_WARNS() << "Found NaN while loading position data from DAE-Model, invalid model." << LL_ENDL;
return LLModel::BAD_ELEMENT;
}
}
@@ -772,7 +772,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
if (!vert.getNormal().isFinite3())
{
llwarns << "Found NaN while loading normals from DAE-Model, invalid model." << llendl;
LL_WARNS() << "Found NaN while loading normals from DAE-Model, invalid model." << LL_ENDL;
return LLModel::BAD_ELEMENT;
}
}
@@ -791,7 +791,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
if (!vert.mTexCoord.isFinite())
{
llwarns << "Found NaN while loading tex coords from DAE-Model, invalid model." << llendl;
LL_WARNS() << "Found NaN while loading tex coords from DAE-Model, invalid model." << LL_ENDL;
return LLModel::BAD_ELEMENT;
}
}
@@ -890,12 +890,12 @@ std::string LLModel::getStatusString(U32 status)
{
if(status_strings[status] == std::string())
{
llerrs << "No valid status string for this status: " << (U32)status << llendl ;
LL_ERRS() << "No valid status string for this status: " << (U32)status << LL_ENDL ;
}
return status_strings[status] ;
}
llerrs << "Invalid model status: " << (U32)status << llendl ;
LL_ERRS() << "Invalid model status: " << (U32)status << LL_ENDL ;
return std::string() ;
}
@@ -971,7 +971,7 @@ BOOL LLModel::createVolumeFacesFromDomMesh(domMesh* mesh)
}
else
{
llwarns << "no mesh found" << llendl;
LL_WARNS() << "no mesh found" << LL_ENDL;
}
return FALSE;
@@ -1267,14 +1267,14 @@ void LLModel::addFace(const LLVolumeFace& face)
{
if (face.mNumVertices == 0)
{
llerrs << "Cannot add empty face." << llendl;
LL_ERRS() << "Cannot add empty face." << LL_ENDL;
}
mVolumeFaces.push_back(face);
if (mVolumeFaces.size() > MAX_MODEL_FACES)
{
llerrs << "Model prims cannot have more than " << MAX_MODEL_FACES << " faces!" << llendl;
LL_ERRS() << "Model prims cannot have more than " << MAX_MODEL_FACES << " faces!" << LL_ENDL;
}
}
@@ -1296,7 +1296,7 @@ void LLModel::generateNormals(F32 angle_cutoff)
if (vol_face.mNumIndices > 65535)
{
llwarns << "Too many vertices for normal generation to work." << llendl;
LL_WARNS() << "Too many vertices for normal generation to work." << LL_ENDL;
continue;
}
@@ -1896,7 +1896,7 @@ LLModel::weight_list& LLModel::getJointInfluences(const LLVector3& pos)
{
if ((iter->first - pos).magVec() > 0.1f)
{
llerrs << "Couldn't find weight list." << llendl;
LL_ERRS() << "Couldn't find weight list." << LL_ENDL;
}
return iter->second;
@@ -2001,7 +2001,7 @@ bool LLModel::loadModel(std::istream& is)
{
if (!LLSDSerialize::fromBinary(header, is, 1024*1024*1024))
{
llwarns << "Mesh header parse error. Not a valid mesh asset!" << llendl;
LL_WARNS() << "Mesh header parse error. Not a valid mesh asset!" << LL_ENDL;
return false;
}
}
@@ -2031,7 +2031,7 @@ bool LLModel::loadModel(std::istream& is)
if (header[nm[lod]]["offset"].asInteger() == -1 ||
header[nm[lod]]["size"].asInteger() == 0 )
{ //cannot load requested LOD
llwarns << "LoD data is invalid!" << llendl;
LL_WARNS() << "LoD data is invalid!" << LL_ENDL;
return false;
}
@@ -2094,7 +2094,7 @@ bool LLModel::loadModel(std::istream& is)
}
else
{
llwarns << "unpackVolumeFaces failed!" << llendl;
LL_WARNS() << "unpackVolumeFaces failed!" << LL_ENDL;
}
return false;
@@ -2112,7 +2112,7 @@ bool LLModel::isMaterialListSubset( LLModel* ref )
for (S32 dst = 0; dst < refCnt; ++dst)
{
//llinfos<<mMaterialList[src]<<" "<<ref->mMaterialList[dst]<<llendl;
//LL_INFOS() <<mMaterialList[src]<<" "<<ref->mMaterialList[dst]<<LL_ENDL;
foundRef = mMaterialList[src] == ref->mMaterialList[dst];
if ( foundRef )
@@ -2157,7 +2157,7 @@ bool LLModel::matchMaterialOrder(LLModel* ref, int& refFaceCnt, int& modelFaceCn
bool isASubset = isMaterialListSubset( ref );
if ( !isASubset )
{
llinfos<<"Material of model is not a subset of reference."<<llendl;
LL_INFOS() <<"Material of model is not a subset of reference."<<LL_ENDL;
return false;
}
@@ -2609,7 +2609,7 @@ LLSD LLModel::Decomposition::asLLSD() const
if (vert_idx > p.size())
{
llerrs << "Index out of bounds" << llendl;
LL_ERRS() << "Index out of bounds" << LL_ENDL;
}
}
}
@@ -2629,7 +2629,7 @@ void LLModel::Decomposition::merge(const LLModel::Decomposition* rhs)
if (mMeshID != rhs->mMeshID)
{
llerrs << "Attempted to merge with decomposition of some other mesh." << llendl;
LL_ERRS() << "Attempted to merge with decomposition of some other mesh." << LL_ENDL;
}
if (mBaseHull.empty())