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

BadConversion = false; // If we get here we've done good. 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 ;-) BadConversion(true) { // No conversion yet ;-)
convert(&bfr[0], bfr.size()); // Recast the pointer and do it. 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 ;-) BadConversion(true) { // No conversion yet ;-)
convert(reinterpret_cast<const unsigned char*>(&bfr[0]), bfr.size()); // Do this to get it done. convert(reinterpret_cast<const unsigned char*>(&bfr[0]), bfr.size()); // Do this to get it done.
} }
BadConversion = false; // If we get here we did ok. 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. BadConversion(true) { // It's bad until we've done it.
convert(&bfr[0], bfr.size()); // Recast the pointer and do 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. 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. convert(reinterpret_cast<const unsigned char*>(&bfr[0]), bfr.size()); // This is how we do it.
} }

+ 2
- 2
networking.cpp View File



// Error description handling for humans. // 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. switch(Errno) { // Assign the appropriate message.
case WSA_INVALID_HANDLE: s = "WSA_INVALID_HANDLE"; break; case WSA_INVALID_HANDLE: s = "WSA_INVALID_HANDLE"; break;

+ 1
- 1
threading.cpp View File

CurrentThreadState(ThreadInitialized); // Set our initialized state. 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. MyThreadType(T), // Use generic Thread Type.
MyThreadName(N), // Use a generic Thread Name. MyThreadName(N), // Use a generic Thread Name.
MyThread(NULL), // Null the thread handle. MyThread(NULL), // Null the thread handle.

Loading…
Cancel
Save