Browse Source

a few more missed std::

master
Pete McNeil 4 years ago
parent
commit
91cd4901f6
3 changed files with 7 additions and 7 deletions
  1. 4
    4
      base64codec.cpp
  2. 2
    2
      networking.cpp
  3. 1
    1
      threading.cpp

+ 4
- 4
base64codec.cpp View File

@@ -130,12 +130,12 @@ void to_base64::convert(const unsigned char* bfr, const int len) {
BadConversion = false; // If we get here we've done good.
}

to_base64::to_base64(const vector<unsigned char>& bfr) : // Converts from a base64buffer.
to_base64::to_base64(const std::vector<unsigned char>& bfr) : // Converts from a base64buffer.
BadConversion(true) { // No conversion yet ;-)
convert(&bfr[0], bfr.size()); // Recast the pointer and do it.
}

to_base64::to_base64(const vector<char>& bfr) : // Converts from a base64codec buffer.
to_base64::to_base64(const std::vector<char>& bfr) : // Converts from a base64codec buffer.
BadConversion(true) { // No conversion yet ;-)
convert(reinterpret_cast<const unsigned char*>(&bfr[0]), bfr.size()); // Do this to get it done.
}
@@ -245,12 +245,12 @@ void from_base64::convert(const unsigned char* bfr, const int len) {
BadConversion = false; // If we get here we did ok.
}

from_base64::from_base64(const vector<unsigned char>& bfr) : // Converts from a base64buffer.
from_base64::from_base64(const std::vector<unsigned char>& bfr) : // Converts from a base64buffer.
BadConversion(true) { // It's bad until we've done it.
convert(&bfr[0], bfr.size()); // Recast the pointer and do it.
}

from_base64::from_base64(const vector<char>& bfr) : // Converts from a buffer.
from_base64::from_base64(const std::vector<char>& bfr) : // Converts from a buffer.
BadConversion(true) { // It's bad until we've done it.
convert(reinterpret_cast<const unsigned char*>(&bfr[0]), bfr.size()); // This is how we do it.
}

+ 2
- 2
networking.cpp View File

@@ -368,8 +368,8 @@ WSADATA WSSTartData;

// Error description handling for humans.

string Networking::DescriptiveError(string Msg, int Errno) { // Form a descriptive error w/ errno.
string s = ""; // Message string.
string Networking::DescriptiveError(std::string Msg, int Errno) { // Form a descriptive error w/ errno.
std::string s = ""; // Message string.

switch(Errno) { // Assign the appropriate message.
case WSA_INVALID_HANDLE: s = "WSA_INVALID_HANDLE"; break;

+ 1
- 1
threading.cpp View File

@@ -165,7 +165,7 @@ Thread::Thread() :
CurrentThreadState(ThreadInitialized); // Set our initialized state.
}

Thread::Thread(const ThreadType& T, const string N) : // Construct with specific Type/Name
Thread::Thread(const ThreadType& T, const std::string N) : // Construct with specific Type/Name
MyThreadType(T), // Use generic Thread Type.
MyThreadName(N), // Use a generic Thread Name.
MyThread(NULL), // Null the thread handle.

Loading…
Cancel
Save