mirror of
https://github.com/aseprite/aseprite.git
synced 2024-09-15 15:14:16 +00:00
Add missing std:: so gcc on Linux works just fine (related to #604)
This commit is contained in:
parent
2c7fe41d6d
commit
69d78a0add
@ -9,8 +9,6 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
#include "app/commands/filters/convolution_matrix_stock.h"
|
||||
|
||||
#include "app/resource_finder.h"
|
||||
@ -18,6 +16,9 @@
|
||||
#include "base/file_handle.h"
|
||||
#include "filters/convolution_matrix.h"
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
namespace app {
|
||||
|
||||
ConvolutionMatrixStock::ConvolutionMatrixStock()
|
||||
@ -33,7 +34,7 @@ ConvolutionMatrixStock::~ConvolutionMatrixStock()
|
||||
SharedPtr<ConvolutionMatrix> ConvolutionMatrixStock::getByName(const char* name)
|
||||
{
|
||||
for (const_iterator it = begin(), end = this->end(); it != end; ++it) {
|
||||
if (strcmp((*it)->getName(), name) == 0)
|
||||
if (std::strcmp((*it)->getName(), name) == 0)
|
||||
return *it;
|
||||
}
|
||||
return SharedPtr<ConvolutionMatrix>(0);
|
||||
@ -73,7 +74,7 @@ void ConvolutionMatrixStock::reloadStock()
|
||||
|
||||
tok_reset_line_num();
|
||||
|
||||
strcpy(leavings, "");
|
||||
std::strcpy(leavings, "");
|
||||
|
||||
// Read the matrix name
|
||||
while (tok_read(f, buf, leavings, sizeof(leavings))) {
|
||||
@ -137,14 +138,14 @@ void ConvolutionMatrixStock::reloadStock()
|
||||
|
||||
// Div
|
||||
READ_TOK();
|
||||
if (strcmp(buf, "auto") != 0)
|
||||
if (std::strcmp(buf, "auto") != 0)
|
||||
div = int(strtod(buf, NULL) * ConvolutionMatrix::Precision);
|
||||
|
||||
matrix->setDiv(div);
|
||||
|
||||
// Bias
|
||||
READ_TOK();
|
||||
if (strcmp(buf, "auto") != 0)
|
||||
if (std::strcmp(buf, "auto") != 0)
|
||||
bias = int(strtod(buf, NULL));
|
||||
|
||||
matrix->setBias(bias);
|
||||
|
@ -9,13 +9,15 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "app/file/file_formats_manager.h"
|
||||
|
||||
#include "app/file/file_format.h"
|
||||
#include "app/file/format_options.h"
|
||||
#include "base/string.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
|
||||
namespace app {
|
||||
|
||||
extern FileFormat* CreateAseFormat();
|
||||
@ -86,10 +88,10 @@ FileFormat* FileFormatsManager::getFileFormatByExtension(const char* extension)
|
||||
char buf[512], *tok;
|
||||
|
||||
for (FileFormat* ff : m_formats) {
|
||||
strcpy(buf, ff->extensions());
|
||||
std::strcpy(buf, ff->extensions());
|
||||
|
||||
for (tok=strtok(buf, ","); tok;
|
||||
tok=strtok(NULL, ",")) {
|
||||
for (tok=std::strtok(buf, ","); tok;
|
||||
tok=std::strtok(NULL, ",")) {
|
||||
if (base::utf8_icmp(extension, tok) == 0)
|
||||
return ff;
|
||||
}
|
||||
|
@ -24,6 +24,8 @@
|
||||
#include "doc/palette.h"
|
||||
#include "doc/sprite.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
namespace app {
|
||||
|
||||
using namespace doc;
|
||||
@ -31,13 +33,13 @@ using namespace doc;
|
||||
void get_readable_palette_extensions(char* buf, int size)
|
||||
{
|
||||
get_readable_extensions(buf, size);
|
||||
strcat(buf, ",col,gpl");
|
||||
std::strcat(buf, ",col,gpl");
|
||||
}
|
||||
|
||||
void get_writable_palette_extensions(char* buf, int size)
|
||||
{
|
||||
get_writable_extensions(buf, size);
|
||||
strcat(buf, ",col,gpl");
|
||||
std::strcat(buf, ",col,gpl");
|
||||
}
|
||||
|
||||
Palette* load_palette(const char *filename)
|
||||
|
@ -32,6 +32,8 @@
|
||||
#include "app/ui/main_window.h"
|
||||
#include "app/ui/timeline.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
namespace app {
|
||||
|
||||
using namespace ui;
|
||||
@ -169,7 +171,7 @@ bool DrawingState::onKeyDown(Editor* editor, KeyMessage* msg)
|
||||
if (KeyboardShortcuts::instance()
|
||||
->getCommandFromKeyMessage(msg, &command, ¶ms)) {
|
||||
// We accept zoom commands.
|
||||
if (strcmp(command->short_name(), CommandId::Zoom) == 0) {
|
||||
if (std::strcmp(command->short_name(), CommandId::Zoom) == 0) {
|
||||
UIContext::instance()->executeCommand(command, params);
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ void SkinPart::clear()
|
||||
}
|
||||
}
|
||||
|
||||
void SkinPart::setBitmap(size_t index, she::Surface* bitmap)
|
||||
void SkinPart::setBitmap(std::size_t index, she::Surface* bitmap)
|
||||
{
|
||||
if (index >= m_bitmaps.size())
|
||||
m_bitmaps.resize(index+1, NULL);
|
||||
|
@ -36,7 +36,7 @@ namespace doc {
|
||||
const_iterator begin() const { return m_tags.begin(); }
|
||||
const_iterator end() const { return m_tags.end(); }
|
||||
|
||||
size_t size() const { return m_tags.size(); }
|
||||
std::size_t size() const { return m_tags.size(); }
|
||||
|
||||
private:
|
||||
Sprite* m_sprite;
|
||||
|
Loading…
Reference in New Issue
Block a user