HF
This commit is contained in:
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <IACore/iterator.hpp>
|
#include <IACore/Iterator.hpp>
|
||||||
|
|
||||||
namespace ia
|
namespace ia
|
||||||
{
|
{
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <IACore/iterator.hpp>
|
#include <IACore/Iterator.hpp>
|
||||||
|
|
||||||
namespace ia
|
namespace ia
|
||||||
{
|
{
|
||||||
|
|||||||
@ -16,8 +16,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <IACore/allocator.hpp>
|
#include <IACore/Allocator.hpp>
|
||||||
#include <IACore/memory.hpp>
|
#include <IACore/Memory.hpp>
|
||||||
|
|
||||||
#include "span.interface.inl"
|
#include "span.interface.inl"
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <IACore/iterator.hpp>
|
#include <IACore/Iterator.hpp>
|
||||||
|
|
||||||
namespace ia
|
namespace ia
|
||||||
{
|
{
|
||||||
|
|||||||
@ -16,9 +16,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <IACore/allocator.hpp>
|
#include <IACore/Allocator.hpp>
|
||||||
#include <IACore/hashable.hpp>
|
#include <IACore/Hashable.hpp>
|
||||||
#include <IACore/memory.hpp>
|
#include <IACore/Memory.hpp>
|
||||||
|
|
||||||
#include "iterator.interface.inl"
|
#include "iterator.interface.inl"
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <IACore/base.hpp>
|
#include <IACore/Base.hpp>
|
||||||
|
|
||||||
namespace ia
|
namespace ia
|
||||||
{
|
{
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <IACore/base.hpp>
|
#include <IACore/Base.hpp>
|
||||||
|
|
||||||
namespace ia
|
namespace ia
|
||||||
{
|
{
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <IACore/allocator.hpp>
|
#include <IACore/Allocator.hpp>
|
||||||
|
|
||||||
namespace ia
|
namespace ia
|
||||||
{
|
{
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <IACore/allocator.hpp>
|
#include <IACore/Allocator.hpp>
|
||||||
|
|
||||||
//#include "iterator.interface.inl"
|
//#include "iterator.interface.inl"
|
||||||
#include "entry.interface.inl"
|
#include "entry.interface.inl"
|
||||||
|
|||||||
@ -16,9 +16,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <IACore/list.hpp>
|
#include <IACore/List.hpp>
|
||||||
#include <IACore/vector.hpp>
|
#include <IACore/Vector.hpp>
|
||||||
#include <IACore/hashable.hpp>
|
#include <IACore/Hashable.hpp>
|
||||||
|
|
||||||
namespace ia
|
namespace ia
|
||||||
{
|
{
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <memory.h>
|
#include <memory.h>
|
||||||
#include <IACore/base.hpp>
|
#include <IACore/Base.hpp>
|
||||||
|
|
||||||
namespace ia
|
namespace ia
|
||||||
{
|
{
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <IACore/base.hpp>
|
#include <IACore/Base.hpp>
|
||||||
|
|
||||||
namespace ia
|
namespace ia
|
||||||
{
|
{
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <IACore/base.hpp>
|
#include <IACore/Base.hpp>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
namespace ia
|
namespace ia
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <IACore/container.hpp>
|
#include <IACore/Container.hpp>
|
||||||
|
|
||||||
namespace ia
|
namespace ia
|
||||||
{
|
{
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <IACore/container.hpp>
|
#include <IACore/Container.hpp>
|
||||||
|
|
||||||
namespace ia
|
namespace ia
|
||||||
{
|
{
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <IACore/algorithm.hpp>
|
#include <IACore/Algorithm.hpp>
|
||||||
|
|
||||||
#include "interface/ordered.interface.inl"
|
#include "interface/ordered.interface.inl"
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#if __STDC_HOSTED__ and !IACORE_FREESTANDING
|
#if __STDC_HOSTED__ and !IACORE_FREESTANDING
|
||||||
#include <IACore/types.hpp>
|
#include <IACore/Types.hpp>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|||||||
@ -16,9 +16,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <IACore/exception.hpp>
|
#include <IACore/Exception.hpp>
|
||||||
#include <IACore/string.hpp>
|
#include <IACore/String.hpp>
|
||||||
#include <IACore/vector.hpp>
|
#include <IACore/Vector.hpp>
|
||||||
|
|
||||||
namespace ia
|
namespace ia
|
||||||
{
|
{
|
||||||
@ -111,17 +111,17 @@ namespace ia
|
|||||||
constexpr char pathDelimiter = '/';
|
constexpr char pathDelimiter = '/';
|
||||||
|
|
||||||
auto t = path.rfind(pathDelimiter);
|
auto t = path.rfind(pathDelimiter);
|
||||||
if (t == String::npos)
|
if (t == path.end())
|
||||||
{
|
{
|
||||||
if CONSTEXPR (includeExtension)
|
if CONSTEXPR (includeExtension)
|
||||||
return path;
|
return path;
|
||||||
|
|
||||||
return path.substr(0, path.rfind('.'));
|
return path.slice(0, path.rfind('.'));
|
||||||
}
|
}
|
||||||
if constexpr (includeExtension)
|
if constexpr (includeExtension)
|
||||||
return path.substr(t + 1);
|
return path.slice(t + 1, path.end());
|
||||||
|
|
||||||
return path.substr(t + 1, path.rfind('.') - t - 1);
|
return path.slice(t + 1, path.begin() + (path.rfind('.') - t) - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
String ExtractDirectoryFromPath(IN CONST String &path)
|
String ExtractDirectoryFromPath(IN CONST String &path)
|
||||||
@ -129,10 +129,10 @@ namespace ia
|
|||||||
constexpr char pathDelimiter = '/';
|
constexpr char pathDelimiter = '/';
|
||||||
|
|
||||||
auto t = path.rfind(pathDelimiter);
|
auto t = path.rfind(pathDelimiter);
|
||||||
if (t == String::npos)
|
if (t == path.end())
|
||||||
return "./";
|
return "./";
|
||||||
|
|
||||||
return path.substr(0, t + 1);
|
return path.slice(0, t + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
#include <IACore/Logger.hpp>
|
#include <IACore/Logger.hpp>
|
||||||
#include <IACore/file.hpp>
|
#include <IACore/File.hpp>
|
||||||
|
|
||||||
#include <IACore/vector.hpp>
|
#include <IACore/Vector.hpp>
|
||||||
#include <IACore/map.hpp>
|
#include <IACore/Map.hpp>
|
||||||
|
|
||||||
using namespace ia;
|
using namespace ia;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user