V2 llcommon merge

This commit is contained in:
Shyotl
2011-02-22 18:24:17 -06:00
parent a207a71066
commit b31db27545
4 changed files with 27 additions and 8 deletions

View File

@@ -91,13 +91,12 @@ void ll_cleanup_apr()
// //
//LLAPRPool //LLAPRPool
// //
LLAPRPool::LLAPRPool(apr_pool_t *parent, apr_size_t size, BOOL releasePoolFlag) LLAPRPool::LLAPRPool(apr_pool_t *parent, apr_size_t size, BOOL releasePoolFlag)
{ : mParent(parent),
mParent = parent ; mReleasePoolFlag(releasePoolFlag),
mReleasePoolFlag = releasePoolFlag ; mMaxSize(size),
mMaxSize = size ; mPool(NULL)
mPool = NULL ; {
createAPRPool() ; createAPRPool() ;
} }
@@ -399,7 +398,7 @@ S32 LLAPRFile::read(void *buf, S32 nbytes)
//llassert_always(mFile); (ASC-TUDCC) -HgB //llassert_always(mFile); (ASC-TUDCC) -HgB
if(!mFile) if(!mFile)
{ {
llwarns << "apr mFile is removed by somebody else. Can not write." << llendl ; llwarns << "apr mFile is removed by somebody else. Can not read." << llendl ;
return 0; return 0;
} }

View File

@@ -324,7 +324,12 @@ void llofstream::close()
if(is_open()) if(is_open())
{ {
if (_Filebuffer->close() == 0) if (_Filebuffer->close() == 0)
{
_Myios::setstate(ios_base::failbit); /*Flawfinder: ignore*/ _Myios::setstate(ios_base::failbit); /*Flawfinder: ignore*/
}
delete _Filebuffer;
_Filebuffer = NULL;
_ShouldClose = false;
} }
} }

View File

@@ -93,6 +93,13 @@ inline const LLReflective* LLMetaPropertyT<LLUUID>::get(const LLReflective* obje
return NULL; return NULL;
} }
template <>
inline const LLReflective* LLMetaPropertyT<bool>::get(const LLReflective* object) const
{
checkObjectClass(object);
return NULL;
}
template <> template <>
inline LLSD LLMetaPropertyT<S32>::getLLSD(const LLReflective* object) const inline LLSD LLMetaPropertyT<S32>::getLLSD(const LLReflective* object) const
{ {
@@ -111,6 +118,12 @@ inline LLSD LLMetaPropertyT<LLUUID>::getLLSD(const LLReflective* object) const
return *(getProperty(object)); return *(getProperty(object));
} }
template <>
inline LLSD LLMetaPropertyT<bool>::getLLSD(const LLReflective* object) const
{
return *(getProperty(object));
}
template<class TObject, class TProperty> template<class TObject, class TProperty>
class LLMetaPropertyTT : public LLMetaPropertyT<TProperty> class LLMetaPropertyTT : public LLMetaPropertyT<TProperty>
{ {

View File

@@ -943,6 +943,8 @@ void LLMetaClassT<LLPermissions>::reflectProperties(LLMetaClass& meta_class)
{ {
reflectProperty(meta_class, "mCreator", &LLPermissions::mCreator); reflectProperty(meta_class, "mCreator", &LLPermissions::mCreator);
reflectProperty(meta_class, "mOwner", &LLPermissions::mOwner); reflectProperty(meta_class, "mOwner", &LLPermissions::mOwner);
reflectProperty(meta_class, "mGroup", &LLPermissions::mGroup);
reflectProperty(meta_class, "mIsGroupOwned", &LLPermissions::mIsGroupOwned);
} }
// virtual // virtual