Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove usages of no-op POEMs (misc) #2231

Merged
merged 1 commit into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions third_party/QR-Code-generator/cpp/QrSegment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@

#include "starboard/common/log.h"

#if defined(STARBOARD)
#include "starboard/client_porting/poem/string_poem.h"
#define STRCHR_QR strchr
#else
#define STRCHR_QR std::strchr
#endif

#define throw SB_CHECK(false) <<

using std::uint8_t;
Expand Down Expand Up @@ -112,7 +105,7 @@ QrSegment QrSegment::makeAlphanumeric(const char *text) {
int accumCount = 0;
int charCount = 0;
for (; *text != '\0'; text++, charCount++) {
const char* temp = STRCHR_QR(ALPHANUMERIC_CHARSET, *text);
const char *temp = std::strchr(ALPHANUMERIC_CHARSET, *text);
if (temp == nullptr)
throw "String contains unencodable characters in alphanumeric mode";
accumData = accumData * 45 + (temp - ALPHANUMERIC_CHARSET);
Expand Down Expand Up @@ -203,7 +196,7 @@ int QrSegment::getTotalBits(const vector<QrSegment> &segs, int version) {

bool QrSegment::isAlphanumeric(const char *text) {
for (; *text != '\0'; text++) {
if (STRCHR_QR(ALPHANUMERIC_CHARSET, *text) == nullptr)
if (std::strchr(ALPHANUMERIC_CHARSET, *text) == nullptr)
return false;
}
return true;
Expand Down Expand Up @@ -238,5 +231,3 @@ const std::vector<bool> &QrSegment::getData() const {
const char *QrSegment::ALPHANUMERIC_CHARSET = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";

}

#undef STRCHR_QR
4 changes: 0 additions & 4 deletions third_party/angle/src/common/angleutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
#include <limits>
#include <vector>

#if defined(STARBOARD)
#include "starboard/client_porting/poem/string_poem.h"
#endif

namespace angle
{
// dirtyPointer is a special value that will make the comparison with any valid pointer fail and
Expand Down
4 changes: 0 additions & 4 deletions third_party/boringssl/src/crypto/bio/printf.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@
#include <openssl/err.h>
#include <openssl/mem.h>

#ifdef STARBOARD
#include "starboard/client_porting/poem/stdio_poem.h"
#endif

int BIO_printf(BIO *bio, const char *format, ...) {
va_list args;
char buf[256], *out, out_malloced = 0;
Expand Down
11 changes: 1 addition & 10 deletions third_party/ots/src/ots.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@

#include <woff2/decode.h>

#if !defined(STARBOARD)
#include <cstdio>
#define VSNPRINTF_OTS std::vsnprintf
#else
#include "starboard/client_porting/poem/stdio_poem.h"
#define VSNPRINTF_OTS vsnprintf
#endif

// The OpenType Font File
// http://www.microsoft.com/typography/otspec/otff.htm

Expand Down Expand Up @@ -1035,7 +1027,7 @@ bool Table::ShouldSerialize() {

void Table::Message(int level, const char *format, va_list va) {
char msg[206] = { OTS_UNTAG(m_tag), ':', ' ' };
VSNPRINTF_OTS(msg + 6, 200, format, va);
std::vsnprintf(msg + 6, 200, format, va);
m_font->file->context->Message(level, msg);
}

Expand Down Expand Up @@ -1130,4 +1122,3 @@ bool OTSContext::Process(OTSStream *output,
}

} // namespace ots
#undef VSNPRINTF_OTS
7 changes: 1 addition & 6 deletions third_party/woff2/src/woff2_enc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,11 @@

#include <stdlib.h>
#include <complex>
#include <cstring>
#include <limits>
#include <string>
#include <vector>

#if !defined(STARBOARD)
#include <cstring>
#else
#include "starboard/client_porting/poem/string_poem.h"
#endif

#include <brotli/encode.h>
#include "./buffer.h"
#include "./font.h"
Expand Down
Loading