Skip to content
Snippets Groups Projects
Commit b281751e authored by Steven Murray's avatar Steven Murray
Browse files

Simplified C++ comments

parent e5e9ae0b
No related branches found
Tags v0.0-27
No related merge requests found
......@@ -50,15 +50,15 @@ castor::tape::utils::SmartFILEPtr::SmartFILEPtr(FILE *const file) throw() :
//-----------------------------------------------------------------------------
void castor::tape::utils::SmartFILEPtr::reset(FILE *const file = NULL)
throw() {
// If the new FILE pointer is not the one already owned
// If the new pointer is not the one already owned
if(file != m_file) {
// If this SmartFILEPtr still owns a FILE pointer, then close it
// If this smart pointer still owns a pointer, then fclose it
if(m_file != NULL) {
fclose(m_file);
}
// Take ownership of the new FILE pointer
// Take ownership of the new pointer
m_file = file;
}
}
......@@ -100,21 +100,21 @@ FILE *castor::tape::utils::SmartFILEPtr::get() const throw() {
FILE *castor::tape::utils::SmartFILEPtr::release()
throw(castor::exception::Exception) {
// If this SmartFILEPtr does not own a FILE pointer
// If this smart pointer does not own a pointer
if(m_file == NULL) {
castor::exception::Exception ex(EPERM);
ex.getMessage() <<
"Smart FILE pointer does not own a basic FILE pointer";
"Smart pointer does not own a FILE pointer";
throw(ex);
}
FILE *const tmpFile = m_file;
FILE *const tmp = m_file;
// A NULL value indicates this SmartFILEPtr does not own a FILE pointer
// A NULL value indicates this smart pointer does not own a pointer
m_file = NULL;
return tmpFile;
return tmp;
}
......@@ -35,8 +35,8 @@ namespace tape {
namespace utils {
/**
* A smart FILE pointer that owns a basic FILE pointer. When the smart FILE
* pointer goes out of scope, it will close the FILE pointer it owns.
* A smart pointer that owns a FILE pointer. When the smart pointer goes out
* of scope, it will fclose the FILE pointer it owns.
*/
class SmartFILEPtr {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment