Clean up namespace usage

Always use std:: and always omit sf::
This commit is contained in:
Chris Thrasher 2023-04-06 08:45:46 -06:00 committed by GitHub
parent f5e6c67daf
commit 07001196eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 10 deletions

View File

@ -122,7 +122,7 @@ void Music::setLoopPoints(TimeSpan timePoints)
// Check our state. This averts a divide-by-zero. GetChannelCount() is cheap enough to use often
if (getChannelCount() == 0 || m_file.getSampleCount() == 0)
{
sf::err() << "Music is not in a valid state to assign Loop Points." << std::endl;
err() << "Music is not in a valid state to assign Loop Points." << std::endl;
return;
}
@ -135,12 +135,12 @@ void Music::setLoopPoints(TimeSpan timePoints)
// Validate
if (samplePoints.offset >= m_file.getSampleCount())
{
sf::err() << "LoopPoints offset val must be in range [0, Duration)." << std::endl;
err() << "LoopPoints offset val must be in range [0, Duration)." << std::endl;
return;
}
if (samplePoints.length == 0)
{
sf::err() << "LoopPoints length val must be nonzero." << std::endl;
err() << "LoopPoints length val must be nonzero." << std::endl;
return;
}

View File

@ -70,13 +70,13 @@ VertexBuffer::VertexBuffer(PrimitiveType type) : m_primitiveType(type)
////////////////////////////////////////////////////////////
VertexBuffer::VertexBuffer(VertexBuffer::Usage usage) : m_usage(usage)
VertexBuffer::VertexBuffer(Usage usage) : m_usage(usage)
{
}
////////////////////////////////////////////////////////////
VertexBuffer::VertexBuffer(PrimitiveType type, VertexBuffer::Usage usage) : m_primitiveType(type), m_usage(usage)
VertexBuffer::VertexBuffer(PrimitiveType type, Usage usage) : m_primitiveType(type), m_usage(usage)
{
}
@ -314,7 +314,7 @@ PrimitiveType VertexBuffer::getPrimitiveType() const
////////////////////////////////////////////////////////////
void VertexBuffer::setUsage(VertexBuffer::Usage usage)
void VertexBuffer::setUsage(Usage usage)
{
m_usage = usage;
}

View File

@ -67,7 +67,7 @@ const char* getLibraryName(JNIEnv* lJNIEnv, jobject& objectActivityInfo)
if (valueString == nullptr)
{
LOGE("No meta-data 'sfml.app.lib_name' found in AndroidManifest.xml file");
exit(1);
std::exit(1);
}
// Convert the application name to a C++ string and return it
@ -77,7 +77,7 @@ const char* getLibraryName(JNIEnv* lJNIEnv, jobject& objectActivityInfo)
if (applicationNameLength >= 256)
{
LOGE("The value of 'sfml.app.lib_name' must not be longer than 255 characters.");
exit(1);
std::exit(1);
}
strncpy(name, applicationName, static_cast<std::size_t>(applicationNameLength));
@ -123,7 +123,7 @@ void* loadLibrary(const char* libraryName, JNIEnv* lJNIEnv, jobject& ObjectActiv
if (!handle)
{
LOGE("dlopen(\"%s\"): %s", libraryPath, dlerror());
exit(1);
std::exit(1);
}
// Release the Java string
@ -217,7 +217,7 @@ JNIEXPORT void ANativeActivity_onCreate(ANativeActivity* activity, void* savedSt
if (!ANativeActivity_onCreate)
{
LOGE("sfml-activity: Undefined symbol ANativeActivity_onCreate");
exit(1);
std::exit(1);
}
ANativeActivity_onCreate(activity, savedState, savedStateSize);