Import backup from 2004-06-07
This commit is contained in:
1 parent
b5ba5b63fe
commit
802a07ebfe
13 files changed
+1399
-17
No files matched your search
@@ -5,6 +5,9 @@
|
||||
// Date: 05/22/04
|
||||
// Modified: 06/03/04
|
||||
|
||||
#ifndef __HOS_LINKEDLIST__
|
||||
#define __HOS_LINKEDLIST__ __HOS_LINKEDLIST__
|
||||
|
||||
template <typename Element>
|
||||
class LinkedList
|
||||
{
|
||||
@@ -199,3 +202,5 @@ Element & LinkedList<Element>::operator[](int index)
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// implements c++ string object for HOS
|
||||
// Author: Josh Holtrop
|
||||
// Date: 06/01/04
|
||||
// Modified: 06/01/04
|
||||
// Modified: 06/07/04
|
||||
|
||||
#include "string.h" //string class declaration
|
||||
#include "asmfuncs.h" //memcpy(void *dest, void *src, int n), strlen(char *str)
|
||||
@@ -198,14 +198,14 @@ string::string(char chr, const string & str1)
|
||||
|
||||
const char & string::operator[](unsigned int index) const
|
||||
{
|
||||
if (index >= 0 && index < myLength)
|
||||
if (index < myLength)
|
||||
return myChars[index];
|
||||
return *myChars; //if index is invalid, return a pointer to the trailing 0
|
||||
}
|
||||
|
||||
char & string::operator[](unsigned int index)
|
||||
{
|
||||
if (index >= 0 && index < myLength)
|
||||
if (index < myLength)
|
||||
return myChars[index];
|
||||
return *myChars; //if index is invalid, return a pointer to the trailing 0
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// implements c++ string object for HOS
|
||||
// Author: Josh Holtrop
|
||||
// Date: 06/01/04
|
||||
// Modified: 06/03/04
|
||||
// Modified: 06/07/04
|
||||
|
||||
|
||||
#ifndef __HOS_STRING__
|
||||
|
||||
Reference in new issue
Block a user