hlBool CMapping::Commit(CView &View, hlULongLong uiOffset, hlULongLong uiLength) { if(!this->GetOpened() || View.GetMapping() != this) { LastError.SetErrorMessage("View does not belong to mapping."); return hlFalse; } if(uiOffset + uiLength > View.GetLength()) { #ifdef _WIN32 LastError.SetErrorMessageFormated("Requested range (%I64u, %I64u) does not fit inside view, (%I64u, %I64u).", uiOffset, uiLength, 0ULL, View.GetLength()); #else LastError.SetErrorMessageFormated("Requested range (%llu, %llu) does not fit inside view, (%llu, %llu).", uiOffset, uiLength, 0ULL, View.GetLength()); #endif return hlFalse; } if((this->GetMode() & HL_MODE_WRITE) == 0) { // Not in write mode so nothing to do. return hlTrue; } return this->CommitInternal(View, uiOffset, uiLength); }
hlBool CMapping::Commit(CView &View) { return this->Commit(View, 0, View.GetLength()); }